Re: multiple CREATE FUNCTION AS items for PLs - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: multiple CREATE FUNCTION AS items for PLs
Date
Msg-id 50CE24A6.4070508@dunslane.net
Whole thread Raw
In response to multiple CREATE FUNCTION AS items for PLs  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: multiple CREATE FUNCTION AS items for PLs  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
On 12/16/2012 01:37 AM, Peter Eisentraut wrote:
> So in practice this might look like this:
>
> CREATE FUNCTION foo(...) ... LANGUAGE plpythonu
> AS $$
> import x
> import y
> $$,
> $$
> real code here
> $$;
>


Bleah.

It seems obscure to say the least.

Why not have something along the lines of plperl's on_init setting to 
load libraries? Among other things that would give you the advantage of 
being able to preload them, and also of some consistency among PLs.

cheers

andrew



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: multiple CREATE FUNCTION AS items for PLs
Next
From: Hannu Krosing
Date:
Subject: Re: multiple CREATE FUNCTION AS items for PLs