Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA34103 for ; Thu, 22 Jul 1999 23:04:22 -0400 (EDT) (envelope-from Inoue@tpf.co.jp) Received: from cadzone ([126.0.1.40] (may be forged)) by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id MAA03206; Fri, 23 Jul 1999 12:03:17 +0900 From: "Hiroshi Inoue" To: "Tom Lane" , "Zakkr" Cc: "pgsql-interfaces" Subject: RE: [INTERFACES] SPI_exec vs. CREATE/DROP RULE Date: Fri, 23 Jul 1999 12:05:49 +0900 Message-ID: <000601bed4b8$44575e40$2801007e@cadzone.tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 In-Reply-To: <11160.932691245@sss.pgh.pa.us> Importance: Normal > -----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 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; }