Sorry for posting w/o patch. Just a errata for pg_exec() pg_exec()'s 1st argument is optional but the manual page does not show that.
int pg_exec (int connection, string query) which should be resource pg_exec([resource connection ,] string query) Regards, -- Yasuo Ohgaki