PostgreSQLのトリガを試そうと思って、マニュアルの例をやってみたところ、 test=# CREATE TRIGGER if_dist_exists test-# BEFORE INSERT OR UPDATE ON films FOR EACH ROW test-# EXECUTE PROCEDURE check_primary_key ('did', 'distributors', 'did');
ERROR: CreateTrigger: function check_primary_key() does not exist
[postgres bin]$ postmaster start /usr/bin/postmaster does not know where to find the database system data. You must specify the directory that contains the database system either by specifying the -D invocation option or by setting the PGDATA environment variable.
[postgres bin]$ pg_ctl start pg_ctl: No database directory or environment variable $PGDATA is specified