Time of Update: 2017-02-28
前言:項目中用到了postgreSQL中的earthdistance()函數功能計算地球上兩點之間的距離,中文的資料太少了,我找到了一篇英文的、講的很好的文章 ,特此翻譯,希望能夠協助到以後用到earthdistance的同學。 一、兩種可用的選擇 當我們想用Postgres作為GEO函數使用時,我們通常有2中選擇(據我所知): 1.PostGIS:
Time of Update: 2017-01-13
運行下面的命令建立名為mydb的資料庫 代碼如下複製代碼 createdb mydb 得到一個錯誤:psql: FATAL: role "terry" does not exist, terry是我的機器名, 在postgresql資料庫中沒有名為terry的role, 所以會報出這個錯誤, 只要加上-U參數來指定一個存在的role就可以了,所以我將上面的命令改為: 代碼如下複製代碼 createdb mydb -U
Time of Update: 2018-02-09
標籤:替換 str execution 執行 exec 查詢 append caller 驗證 1.替換目標1).contact欄位類型
Time of Update: 2016-03-31
標籤:原文:ASP.NET MVC 使用 Petapoco 微型ORM架構+NpgSql驅動串連 PostgreSQL資料庫前段時間在園子裡看到了小蝶驚鴻
Time of Update: 2014-12-03
標籤:style ar os sp strong on 資料 art log 在遠程伺服器上安裝了postgresql,用
Time of Update: 2014-10-30
標籤:smtp email postgresql python 代碼如下:#!/usr/bin/env pythonimport smtplibfrom email.mime.text import MIMETextimport psycopg2import
Time of Update: 2014-10-13
標籤:os ar 資料 art on 資料庫 sql as res 1.初始化資料庫;postgresql-setup
Time of Update: 2014-09-18
標籤:des io os ar for 資料 2014 art sp 環境:win7 64 sp1 PG:9.3.5 1、建立使用者postgres,密碼同樣是postgres:
Time of Update: 2014-09-06
標籤:style blog http color os io 使用 ar strong 一、簡介PostgreSQL
Time of Update: 2018-12-03
Postgresql 有以下三種方法設定主鍵遞增的方式,下面來看下相同點和不同點。--方法一create table test_a ( id serial, name character varying(128),constraint pk_test_a_id primary key( id)); NOTICE: CREATE TABLE will create implicit sequence "test_a_id_seq" for serial column
Time of Update: 2018-12-03
背景:postsql 初始接觸,把欄位全部大寫了。postsql欄位需要小寫,不然會出現以下錯誤Caused by: org.postgresql.util.PSQLException: ERROR: column "loginid" of relation "userinfo" does not exist 位置:30at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:
Time of Update: 2018-12-05
PostgreSQL
Time of Update: 2018-12-06
PostgreSQL 效能最佳化http://blog.sina.com.cn/s/blog_681cd80d0100md5o.html 每次看postgresql的設定,好像每次都忘記。過一段時間又要看。今天終於決定,開始blog吧。postgresql 最佳化與維護1. 硬體資料庫最重要的就是 I/O了。所以一切從I/O開始。RAID: 這個基本不用說,資料庫放RAID10上面,唯讀備份資料庫可以放RAID0,反正掛了沒關係。謹記:資料庫是Random
Time of Update: 2018-12-07
從網上看到的.net對PostgreSQL操作的文章(http://www.zdnet.com.cn/developer/code/story/0,3800066897,39530081-1,00.htm)按照他的例子,是要抱錯的,主要是一些細節的地方,他沒有提到.需要添加2個dll檔案:Mono.Security.dll;
Time of Update: 2018-12-07
文章目錄 一、軟體包 一、軟體包1. zlib-1.2.5.tar.gz 2. postgresql-9.0beta2.tar.gz 二、安裝步驟 1. tar zxvf zlib-1.2.5.tar.gz 2. cd zlib-1.2.5 3. ./configure –prefix=/usr/local/zlib make make install 4. Tar zxvf postgresql-9.0beta2.tar.gz 5.
Time of Update: 2018-12-07
一、恢複磁碟空間: 在PostgreSQL中,使用delete和update語句刪除或更新的資料行並沒有被實際刪除,而只是在舊版本資料行的物理地址上將該行的狀態置為已刪除或已到期。因此當資料表中的資料變化極為頻繁時,那麼在一段時間之後該表所佔用的空間將會變得很大,然而資料量卻可能變化不大。要解決該問題,需要定期對資料變化頻繁的資料表執行VACUUM操作。 VACUUM命令存在兩種形式,VACUUM和VACUUM
Time of Update: 2018-12-07
一、索引的類型: PostgreSQL提供了多 種索引類型:B-Tree、Hash、GiST和GIN,由於它們使用了不同的演算法,因此每種索引類型都有其適合的查詢類型,預設時,CREATE INDEX命令將建立B-Tree索引。 1. B-Tree: CREATE TABLE test1 ( id integer, content varchar ); CREATE INDEX test1_id_index ON test1 (
Time of Update: 2018-12-07
postgresql的預設最大串連數是200, 如果串連數超過200就會報 So many clients alreay. 當然你可以通過show max_connections;查看當前最大的串連數 修改最大串連數, 最重要的就是要修改shmmax(Maximum size of shared memory segment
Time of Update: 2018-12-07
作業系統:Debian 3.0 r2 所使用的核心:linux-2.4.23 實驗用到的模組: ipvsadm-1.21,PostgreSQL (ipvsadm命令的詳細用法請參考這裡) 功能描述:這是一個關於LinuxVirtualServer的比較簡單的實驗,是如何?兩台PostgreSQL資料庫的負載平衡。做這個實驗的目的有三個: 1,是一個朋友的需求; 2,我本人也有一段時間沒有看LVS方面的東西了,借這個機會再複習一下;
Time of Update: 2018-12-07
原文連結:http://www.phpwell.com/?p=174PostgreSQLMySQL服務啟動:1)#service postgresql start2)#/etc/init.d/postgresql start3)#su – postgresql$pg_ctl startPostgreSQL的進程號:1210、1207、服務啟動:1)#service mysqld start2)#/etc/init.d/mysqld