Skip site navigation (1) Skip section navigation (2)

Re: Feature request: include script file into function body

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Steve White" <swhite(at)aip(dot)de>
Cc: <pgsql-bugs(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Feature request: include script file into function body
Date: 2011-02-01 19:09:54
Message-ID: 4D480622020000250003A10C@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
Steve White <swhite(at)aip(dot)de> wrote:
 
> I *DO NOT MEAN* that a query should run about grabbing files off
> the server, or wherever.
> 
> I meant something like the replacement that happens with the \i
> command in loading SQL, and under similar circumstances, except
> that somehow non-SQL code is loadad in a function body.
 
Maybe some option for the \i command?  \iq (for input quoted) with
automatic $$ quoting around what is read?
 
That way you could do something like:
 
CREATE FUNCTION yadda_yadda() returns text language plpythonu as
\iq yadda_yadda.py
;
 
-Kevin

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2011-02-01 19:17:35
Subject: Re: Feature request: include script file into function body
Previous:From: Steve WhiteDate: 2011-02-01 19:09:27
Subject: Re: Feature request: include script file into function body (better syntax)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group