Re: How can I display the contents of a function?

From: "Thom Brown" <thombrown(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I display the contents of a function?
Date: 2009-01-19 13:45:24
Message-ID: bddc86150901190545wdad82b6w9839f6e446385c44@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Another reason to look forward to 8.4. :)

Does that function return information in an identical way to selecting from
pg_proc?

2009/1/19 A. Kretschmer <andreas(dot)kretschmer(at)schollglas(dot)com>

> In response to Thom Brown :
> > Thanks everyone! I looked around the user-defined functions section of
> the
> > documentation, but there wasn't any mention of this. I'm sure others
> would
> > find it useful if it were included, or at least referenced to.
>
> Just for info:
>
> wait for the upcoming new release 8.4, it contains a function called
> pg_get_functiondef(). Example:
>
> test=# create or replace function foo(in a int) returns int as $$begin
> return a*10; end; $$language plpgsql;
> CREATE FUNCTION
> test=# select pg_get_functiondef('foo'::regproc);
> pg_get_functiondef
> --------------------------------------------------
> CREATE OR REPLACE FUNCTION public.foo(a integer)
> RETURNS integer
> LANGUAGE plpgsql
> AS $function$begin return a*10; end; $function$
>
> (1 row)
>
>
> http://developer.postgresql.org/pgdocs/postgres/functions-info.html
>
>
> Andreas
> --
> Andreas Kretschmer
> Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
> GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2009-01-19 13:51:43 Re: How can I display the contents of a function?
Previous Message A. Kretschmer 2009-01-19 13:36:58 Re: How can I display the contents of a function?