參考:
http://www.cnblogs.com/huqingyu/archive/2004/07/04/21015.html
http://bbs.51cto.com/archiver/tid-401453.html
安裝手冊:
http://twpug.net/docs/postgresql-doc-8.0-zh_TW/install-procedure.html
su postgres
[postgres@TM bin]$ ./initdb -D /usr/local/pgsql/data -E UNICODE --locale=zh_TW.utf8The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale zh_TW.utf8.initdb: could not find suitable text search configuration for locale "zh_TW.utf8"The default text search configuration will be set to "simple".fixing permissions on existing directory /usr/local/pgsql/data ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers/max_fsm_pages ... 32MB/204800creating configuration files ... okcreating template1 database in /usr/local/pgsql/data/base/1 ... okinitializing pg_authid ... okinitializing dependencies ... okcreating system views ... okloading system objects' descriptions ... okcreating conversions ... okcreating dictionaries ... oksetting privileges on built-in objects ... okcreating information schema ... okvacuuming database template1 ... okcopying template1 to template0 ... okcopying template1 to postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the -A option thenext time you run initdb.Success. You can now start the database server using:./postgres -D /usr/local/pgsql/dataor./pg_ctl -D /usr/local/pgsql/data -l logfile start
http://twpug.net/docs/postgresql-doc-8.0-zh_TW/multibyte.html
locale放在/usr/lib/locale/目錄中
sql指令:
http://twpug.net/docs/postgresql-doc-8.0-zh_TW/sql-commands.html
test=# SELECT current_date;date------------2007-10-16(1 row)test=# CREATE TABLE weather (test(# a varchar(80),test(# b int, -- ....test(# c int, -- ....test(# d real, -- ...test(# e datetest(# );CREATE TABLEtest=# INSERT INTO weather (a, b, c, d, e)test-# VALUES ('San Francisco', 1, 2, 3.3, '2007-11-29');INSERT 0 1test=# select a, b, c, d, e from weather; a | b | c | d | e---------------+---------+---------+------+------------San Francisco | 1 | 2 | 3 | 2007-11-29(1 row)
jdbc driver:
http://www.blogjava.net/wujun/archive/2006/06/30/55924.html
文章標籤
全站熱搜