Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyqO4-0006Ud-Dk for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Jan 2013 21:00:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyqO3-0006P8-EX for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Jan 2013 21:00:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyqO2-0006P2-Ii for pgsql-bugs@postgresql.org; Fri, 25 Jan 2013 21:00:34 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyqNx-0006V6-1j for pgsql-bugs@postgresql.org; Fri, 25 Jan 2013 21:00:34 +0000 Received: from anarazel.de (p5DDC4573.dip.t-dialin.net [93.220.69.115]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MXjM2-1UU4c60DPq-00WZBo; Fri, 25 Jan 2013 22:00:28 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 2AFCF1C0177; Fri, 25 Jan 2013 22:00:27 +0100 (CET) Date: Fri, 25 Jan 2013 22:00:27 +0100 From: Andres Freund To: Tom Lane Cc: Sandro Santilli , pgsql-bugs@postgresql.org, peter_e@gmx.net Subject: Re: cache lookup failed from empty plpythonu function Message-ID: <20130125210026.GA24655@awork2.anarazel.de> References: <20130124140336.GJ3157@gnash> <20130124141751.GB21296@awork2.anarazel.de> <19721.1359045633@sss.pgh.pa.us> <20130125132025.GD4289@awork2.anarazel.de> <1566.1359143499@sss.pgh.pa.us> <20130125200751.GA27601@awork2.anarazel.de> <20130125203501.GB27601@awork2.anarazel.de> <5594.1359146446@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5594.1359146446@sss.pgh.pa.us> X-Provags-ID: V02:K0:YmoClj3KH6ps/QFx4h8l40F6ZyCw2Zl0hTyEO5SAk6l k+pdR83VSmTUkUTc/nTPFdkbj68OrCFB6Uc59r4VsCgY3aacQ7 W/vD3Bze/lJyzyalEIN20zRYbm4H6xdr/q8MPZdr095Qn+ehr8 CS3+Kz4IMP/FoXWUZG9MyBUXfyNXMYEycWi6GPcALgbHrQUPoN Dd0tGJ2r58FuRXjADZeyZJIvWneNOCzb1G/AxeXSIJhCHc0vCX bBT+vCWx5ND7TYnVld7DWHqINXOvpTrcNHuP87lO8MFfMF+dKm QKrwZppngmxdr9cYY0z8fFGQCtYNSedu6D50xe7OyMVWKU12Mq n41RpcxDawCBqDHpkctkpTpno+O3jszbeVv2jG1Cs X-Pg-Spam-Score: -1.9 (-) 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 On 2013-01-25 15:40:46 -0500, Tom Lane wrote: > Andres Freund writes: > > quite possibly doesn't work if copied from here but for quicker viewing: > > > CREATE OR REPLACE FUNCTION "foo(): > > pass > > > import os > > os._exit(1) > > def "() RETURNS void LANGUAGE plpythonu AS $$pass$$; > > > Yep: > > LOG: server process (PID 29317) exited with exit code 1 > > Ooops. Good thing plpython is already superuser-only, or this would be > a security problem. So should we stop including the SQL function name > in the python name? I don't think it's worth it and having something recognizable in there is useful in (python) backtraces. I am pretty sure I could do the same in the function source with some trickery even without the function being executed just because python also executes stuff during parsing, so I don't think it would buy enough. We probably should care about it if there were a trusted plpython (so you couldn't cause an incomplete function being called or whatever) but I don't see that happening anytime soon. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs