Re: Feature request: include script file into function body (better syntax)

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Feature request: include script file into function body (better syntax)
Date: 2011-02-03 12:05:04
Message-ID: iie5lg$b91$3@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2011-02-01, Steve White <swhite(at)aip(dot)de> wrote:
> 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(at)aip(dot)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...

if the interpreter does it you stop ordinary users from using it
for security reasons,

--
⚂⚃ 100% natural

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Matt Zinicola 2011-02-03 12:50:49 Re: BUG #5862: Postgres dumps core upon a connection attempt
Previous Message Jasen Betts 2011-02-03 12:01:32 Re: Feature request: include script file into function body