Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XUNDT-00030t-H0 for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Sep 2014 21:56:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XUNDS-0004XB-QC for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Sep 2014 21:56:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XUNDR-0004X4-PD for pgsql-bugs@postgresql.org; Wed, 17 Sep 2014 21:56:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XUNDO-0005UY-UL for pgsql-bugs@postgresql.org; Wed, 17 Sep 2014 21:56:44 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s8HLuaQA010027; Wed, 17 Sep 2014 17:56:36 -0400 From: Tom Lane To: Michael Paquier cc: Andres Freund , Fujii Masao , TAKATSUKA Haruka , pgsql-bugs Subject: Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'. In-reply-to: References: <20140902111653.2936.35702@wrigleys.postgresql.org> <5731.1410035128@sss.pgh.pa.us> <20140906203410.GK26947@awork2.anarazel.de> Comments: In-reply-to Michael Paquier message dated "Wed, 17 Sep 2014 09:54:08 -0700" Date: Wed, 17 Sep 2014 14:56:42 -0700 Message-ID: <5427.1410991002@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > On Sat, Sep 6, 2014 at 1:34 PM, Andres Freund wrote: >> On 2014-09-06 16:25:28 -0400, Tom Lane wrote: >>> I don't think this fix is either appropriate or adequate. >> Agreed (and commented offlist. Which probably was a mistake). > This has not been reverted yet. Wouldn't it be better to do that asap? Probably not until someone codes a better fix. I have it on my plate to look into a better fix, but I've been horribly busy lately. > Looking at exec_parse_message, empty input string is allowed for a > cached plan (16503e6f). This solution would break client > applications/drivers using the extending query protocol and relying on > this behavior. This EmptyStmt approach sounds like a good option. Yeah, on second thought I have doubts about the throw-error approach too. We've allowed this historically for a very long time, so I'm afraid we'd get a lot of pushback if we change the external behavior now. The realistic alternatives are either to fix the code to support having plansource->raw_parse_tree be NULL, or to invent a dummy node type to put there. Not sure which is better. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs