Re: Feature request: include script file into function body (better syntax) - Mailing list pgsql-bugs

From Steve White
Subject Re: Feature request: include script file into function body (better syntax)
Date
Msg-id 20110201200410.GB8252@cashmere.aip.de
Whole thread Raw
In response to Re: Feature request: include script file into function body (better syntax)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Feature request: include script file into function body (better syntax)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
Hi Tom,

I already agreed to Kevin's proposed syntax, and it is better than
my suggestion, but mine isn't quite as crazy as you make out.

On  1.02.11, Tom Lane wrote:
> Steve White <swhite@aip.de> writes:
> > Try this instead:
>
> > ================================================
> > CREATE OR REPLACE FUNCTION
> >         myfunc( ... )
> > RETURNS VOID AS '#PGSQL_IMPORT filename' LANGUAGE PLPYTHONU;
> > ================================================
>
> I think having psql decide that string literals mean something other
> than their face value is Right Out --- it would bite you on the rear
> just when you least expect it.

Interesting idea... but why would psql make this decision?
Did somebody suggest that off-line?

I said that the script interpreter might do this...

But the other syntax is better anyway.

> And the notion of the behavior being
> language-dependent is right out to the fourth power.  But see my
> alternative proposal to Kevin just now.
>


--
| -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
| Steve White                                             +49(331)7499-202
| E-Science                                        Zi. 27  Villa Turbulenz
| -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
| Astrophysikalisches Institut Potsdam (AIP)
| An der Sternwarte 16, D-14482 Potsdam
|
| Vorstand: Prof. Dr. Matthias Steinmetz, Peter A. Stolz
|
| Stiftung privaten Rechts, Stiftungsverzeichnis Brandenburg: III/7-71-026
| -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -

pgsql-bugs by date:

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