From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Néstor Boscán <nestorjb(at)gmail(dot)com>, Jerry Sievers <gsievers19(at)comcast(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Quering complete PLPGSQL code |
Date: | 2014-07-15 03:10:56 |
Message-ID: | 53C49BC0.6080505@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 07/14/2014 07:15 PM, Néstor Boscán wrote:
> What's really strange is that the function is returning the code like this:
>
> FUNCTION public."PRUEBA_FUNCION2"(p_1 integer, OUT p_2 integer, INOUT
> p_3 integer, VARIADIC p_4 integer[])
> RETURNS SETOF record
> LANGUAGE plpgsql
> IMMUTABLE STRICT SECURITY DEFINER ROWS 200
> AS $function$begin
> null;
> end;$function$
>
> So the LANGUAGE, INMUTABLE, STRICT, options are written before the code
> instead of after the code.
That is acceptable. In fact that is what you see if you use \ef in psql:
CREATE FUNCTION ( )
RETURNS
LANGUAGE
-- common options: IMMUTABLE STABLE STRICT SECURITY DEFINER
AS $function$
$function$
>
> Regards,
>
> Néstor
>
>
> On Mon, Jul 14, 2014 at 8:07 PM, Néstor Boscán <nestorjb(at)gmail(dot)com
> <mailto:nestorjb(at)gmail(dot)com>> wrote:
>
> Thanks a lot that worked!!!
>
>
> On Mon, Jul 14, 2014 at 6:53 PM, Jerry Sievers
> <gsievers19(at)comcast(dot)net <mailto:gsievers19(at)comcast(dot)net>> wrote:
>
> Néstor Boscán <nestorjb(at)gmail(dot)com <mailto:nestorjb(at)gmail(dot)com>>
> writes:
>
> > Hi
> >
> > I want to get the PLPGSQL code from the PostgreSQL 9.1
> database. I've used pg_proc that only gives me the body of the
> code. Is there a Postgres function that can build
> > all the code?
>
> pg_get_functiondef(oid)
>
>
> >
> > Regards,
> >
> > NÊstor
> >
>
> --
> Jerry Sievers
> Postgres DBA/Development Consulting
> e: postgres(dot)consulting(at)comcast(dot)net
> <mailto:postgres(dot)consulting(at)comcast(dot)net>
> p: 312.241.7800 <tel:312.241.7800>
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-07-15 04:58:45 | Re: Is there a way to get an update date for objects in pg_class |
Previous Message | Néstor Boscán | 2014-07-15 02:15:52 | Re: Quering complete PLPGSQL code |