考慮: create table tab (foo text not null);
create index tab_ix_foo on tab(foo);
select * from tab where foo like 'pre%';
Postgres沒有使用索引做搜索。當使用歸類"POSIX",Postgres使用索引:http://sqlfiddle.com/#!12/ed1cc
安裝postgresql後,我試了一下,輸入createdb mydb,就像它寫在文檔中一樣。然後出現下列錯誤: createdb: could not connect to database postgres: FATAL: role "xxx" does not exist
我研究了文件,其中說: 您需要成爲其下安裝PostgreSQL的(通常是Postgres的)操作系統用戶創建第一用戶