Re: Inline PL/pgSQL - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Inline PL/pgSQL
Date
Msg-id 427FA962.9030900@dunslane.net
Whole thread Raw
In response to Re: Inline PL/pgSQL  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers

Joshua D. Drake wrote:

>>
>> As for implementation, I think it would obviously be best to leave 
>> plpgsql on its own as a PL but maybe change BEGIN and DECLARE in the 
>> normal parser and have the system generate/execute a function on the 
>> fly.  Or, maybe it would be better to integrate plpgsql.  Or, I may 
>> just be crazy.
>>
>> Would anyone else ever benefit from inline functions?
>
>
> Well I could see inline functions being useful for debugging a 
> function during development but I don't think I would want a bunch of 
> plPGSQL mucking up my pretty SQL :)
>
>

Then don't put it there ;-)

I think you'd need to do something like this:

PERFORM language plpgsql $$
 -- some plpgsql stuff here

$$;

cheers

andrew


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Inline PL/pgSQL
Next
From: "Dann Corbit"
Date:
Subject: Re: Can we get patents?