2011/02/24

PostgreSQL 「The server lacks instrumentation functions. なんたらかんたら」

The server lacks instrumentation functions.

pgAdmin III uses some support functions that are not available by default in all PostgreSQL versions.
These enable some tasks that make life easier when The server lacks instrumentation functions.

After the module is installed, you need to create the instrumentation functions in your maintenance database using the admin.sql script (admin81.sql for PostgreSQL) which are usually located in the pgsql share directory (e.g. /usr/local/pgsql/share)

pgAdmin III 使ってたらこういうのがよく出てきてた。いい加減よく読んでみたら、admin81.sql しなよみたいなことらしいのでその通りに。


ここを参考に。
yum install postgresql-contrib

updatedb
locate adminpack.sql

sudo psql -U postgres < adminpack.sql

で、locate って何よ?と。whereis とか which は使ってましたが locate は知りませんでした。

で、バックアップとかリストアとかも GUI でやると何かとひっかかる。pg_dump, pg_restore の方がすんなり。
テーブル作成後に複合キー付けれなかったり、カラムのデータ型の変更が厳しかったりであたふたしたり。SQL Server は私のようなゆとりにもやさしかったなぁ(白目)。

0 件のコメント:

コメントを投稿