php5のインストールに
/usr/ports/lang/php5/ではダメということに気づかずエライ無駄を費やしてしまつた
portsではコレではなく、
/usr/ports/lang/php5extentions/でmakeを行うと無事PostgreSQLのオプションがUIで選べるようになる
やれやれ
あとはメモ
ロールの追加/削除
> su Password: # su pgsql 追加 $ crateuser Enter name of role to add: www Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n CREATE ROLE 削除 $ dropuser www DROP ROLEロールの確認
$ psql database1 database1=> select * from pg_user; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig +++++++ pgsql | 10 | t | t | t | ******** | | www | 16693 | f | f | f | ******** | | hoge | 16387 | t | t | t | ******** | | (5 rows) \qテーブルの確認
$ psql database1
作成テスト
database1=> create table table1 (name varchar(50),telno varchar(50),email varchar(50));
確認
database1=> \d
List of relations
Schema | Name | Type | Owner
+++
public |table1 | table | hoge
(1 row)
\q
テーブルのアクセス権設定grant 付与する権限 on table名 to ユーザー名
$ psql database1
database1=> grant all on table1 to www;
確認
database1=> \z
Access privileges for database "database1"
Schema | Name | Type | Access privileges
+++
public | table1 | table | {hoge=arwdRxt/hoge,www=arwdRxt/hoge}
(1 row)
\q
削除はrevoke

