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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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