Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 20E13B5DC5A for ; Fri, 16 Sep 2011 15:11:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 23142-09-2 for ; Fri, 16 Sep 2011 18:11:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DA2B2B5DC5E for ; Fri, 16 Sep 2011 15:11:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8GIBBwp005491; Fri, 16 Sep 2011 14:11:11 -0400 (EDT) To: "Caleb Welton" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6212: PREPARE(pseudotype) should be blocked off In-reply-to: <201109161710.p8GHAuLK071824@wwwmaster.postgresql.org> References: <201109161710.p8GHAuLK071824@wwwmaster.postgresql.org> Comments: In-reply-to "Caleb Welton" message dated "Fri, 16 Sep 2011 17:10:56 +0000" Date: Fri, 16 Sep 2011 14:11:11 -0400 Message-ID: <5490.1316196671@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/101 X-Sequence-Number: 31118 "Caleb Welton" writes: > statements such as: > PREPARE p1(anyelement) AS SELECT quote_literal($1); > PREPARE p2(internal) AS SELECT int2recv($1); > Should not be allowed. Hmm. It would require an extra catalog lookup per parameter to enforce that. Not sure that it's worth it just to prevent "peculiar" errors. Can you point to any worse consequences? regards, tom lane