Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 898B31337B54 for ; Tue, 1 Feb 2011 18:28:22 -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 45274-07 for ; Tue, 1 Feb 2011 22:28:16 +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 1FEF41337B58 for ; Tue, 1 Feb 2011 18:28:14 -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 p11MPhWa004331; Tue, 1 Feb 2011 17:25:43 -0500 (EST) To: "Kevin Grittner" cc: "Robert Haas" , "Steve White" , pgsql-bugs@postgresql.org Subject: Re: Feature request: include script file into function body In-reply-to: <4D48335E020000250003A13E@gw.wicourts.gov> References: <20110201112120.GA1327@cashmere.aip.de> <26900.1296576145@sss.pgh.pa.us> <20110201164422.GA3023@cashmere.aip.de> <4D47EB12020000250003A0EE@gw.wicourts.gov> <20110201185004.GA7511@cashmere.aip.de> <4D480622020000250003A10C@gw.wicourts.gov> <1191.1296588973@sss.pgh.pa.us> <20110201195915.GA8252@cashmere.aip.de> <4D481423020000250003A123@gw.wicourts.gov> <4D48335E020000250003A13E@gw.wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Tue, 01 Feb 2011 16:22:54 -0600" Date: Tue, 01 Feb 2011 17:25:43 -0500 Message-ID: <4330.1296599143@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/30 X-Sequence-Number: 29302 "Kevin Grittner" writes: > Robert Haas wrote: >> Can't you already do it this way: >> >> \set yadda `cat yadda_yadda.py` >> CREATE FUNCTION yadda_yadda() returns text language plpythonu AS >> :'yadda'; > Clever, but not pretty. Yeah. So the question is whether this is useful enough to justify providing a shortcut. regards, tom lane