Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E71F01337C15 for ; Tue, 1 Feb 2011 15:12:19 -0400 (AST) 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 87615-04-3 for ; Tue, 1 Feb 2011 19:12:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DF1A21337BE1 for ; Tue, 1 Feb 2011 15:11:15 -0400 (AST) 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 p11J8iqZ000591; Tue, 1 Feb 2011 14:08:44 -0500 (EST) To: "Kevin Grittner" cc: "Steve White" , pgsql-bugs@postgresql.org Subject: Re: Feature request: include script file into function body In-reply-to: <4D48023F020000250003A104@gw.wicourts.gov> References: <20110201112120.GA1327@cashmere.aip.de> <26900.1296576145@sss.pgh.pa.us> <20110201164422.GA3023@cashmere.aip.de> <4D47EB12020000250003A0EE@gw.wicourts.gov> <20110201175718.GB6707@cashmere.aip.de> <4D48023F020000250003A104@gw.wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Tue, 01 Feb 2011 12:53:19 -0600" Date: Tue, 01 Feb 2011 14:08:44 -0500 Message-ID: <590.1296587324@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/19 X-Sequence-Number: 29291 "Kevin Grittner" writes: > It seems to me that something which let you pull the body of a > script file into the statement on the *client* side of the > connection, before sending the CREATE FUNCTION statement to the > server would not only be a lot more secure (you could only read > files that the OS would let your login read anyway), but would be > more *useful*. The usual procedure is to put the whole CREATE FUNCTION statement into a file, which you can then send with \i. I'm not quite seeing the point of having just the body in a file? It's not like the body is typically useful to run as standalone code. regards, tom lane