> -----Original Message-----
> From: owner-pgsql-interfaces@postgreSQL.org
> [mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of Tom Lane
> Sent: Friday, July 23, 1999 9:54 AM
> To: Zakkr
> Cc: pgsql-interfaces
> Subject: Re: [INTERFACES] SPI_exec vs. CREATE/DROP RULE
>
>
> Zakkr <zakkr@zf.jcu.cz> writes:
> > I try in my function use SPI_exec() with CREATE or DROP RULE,
> but if I call
> > my func. - server return this message:
> > "Backend send D message without prior T".
>
> That's a known bug with utility statements executed via SPI. Someone
> was looking into a fix a few months ago, but I haven't heard anything
> about it since then...
>
Sorry,I missed the change of "CREATE RULE".
Here is a patch.
Hiroshi Inoue
Inoue@tpf.co.jp
*** backend/rewrite/rewriteDefine.c.orig Wed May 26 16:04:41 1999
--- backend/rewrite/rewriteDefine.c Fri Jul 23 11:22:09 1999
***************
*** 131,137 **** rulname, evtype, eventrel_oid, evslot_index, actionbuf, qualbuf, is_instead);
! pg_exec_query_acl_override(rulebuf); return LastOidProcessed; }
--- 131,137 ---- rulname, evtype, eventrel_oid, evslot_index, actionbuf, qualbuf, is_instead);
! pg_exec_query_dest(rulebuf, None, true); return LastOidProcessed; }