Re: Feature request: include script file into function body - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: Feature request: include script file into function body
Date
Msg-id 4D480622020000250003A10C@gw.wicourts.gov
Whole thread Raw
In response to Re: Feature request: include script file into function body  (Steve White <swhite@aip.de>)
Responses Re: Feature request: include script file into function body  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Steve White <swhite@aip.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

pgsql-bugs by date:

Previous
From: Steve White
Date:
Subject: Re: Feature request: include script file into function body (better syntax)
Next
From: Gary Doades
Date:
Subject: Re: Feature request: include script file into function body