Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 67791B5DCE5 for ; Fri, 16 Sep 2011 17:48:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 71584-04 for ; Fri, 16 Sep 2011 20:48:23 +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 C9FCAB5DCE2 for ; Fri, 16 Sep 2011 17:48:22 -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 p8GKmKT4010988; Fri, 16 Sep 2011 16:48:20 -0400 (EDT) To: Caleb.Welton@emc.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6212: PREPARE(pseudotype) should be blocked off In-reply-to: References: <201109161710.p8GHAuLK071824@wwwmaster.postgresql.org> <5490.1316196671@sss.pgh.pa.us> Comments: In-reply-to message dated "Fri, 16 Sep 2011 15:35:05 -0400" Date: Fri, 16 Sep 2011 16:48:20 -0400 Message-ID: <10987.1316206100@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/103 X-Sequence-Number: 31120 writes: > On Sep 16, 2011, at 11:11 AM, Tom Lane wrote: >> 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? > I haven't found any more severe issues and I'll agree its not a high priority item. But the fix is simple enough that I don't see a reason to ignore it either. > The easiest fix would be, as you say, adding one extra syscache lookup: If it were just PREPARE I'd have done it without quibbling; that isn't something I regard as a critical performance path. But if we're trying to lock this out then we logically have to enforce the same restriction in exec_parse_message, and that *is* a performance-critical path. Plus it has no existing catalog lookup that might be kluged to pass back the extra information. Maybe we should do it anyway, but I'd really like to see a more significant reason. regards, tom lane