pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedOID for pg_get_functiondef
4+ messages / 3 participants
[nested] [flat]
* OID for pg_get_functiondef
@ 2011-05-02 16:52 jtkells@verizon.net
2011-05-02 17:15 ` Re: OID for pg_get_functiondef Raghavendra <raghavendra.rao@enterprisedb.com>
2011-05-02 17:23 ` Re: OID for pg_get_functiondef Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 2 replies; 4+ messages in thread
From: jtkells@verizon.net @ 2011-05-02 16:52 UTC (permalink / raw)
To: pgsql-admin
I've just started working on an 8.4 database and I have been asked to
extract all the functions source code stored in various databases and
schemas so they can be put into a repository for the developers. I'm
planning to use pg_get_functiondef(OID) but I am having a hard time
finding the OID for functions. I've looked into the
information_schema and the pg_catalog schemas and have found
information on functions but none of them seem to have the OID of the
function. Can anyone please tell how to get the OID for a function
within a schema and or if there is a better way.
Thanks
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: OID for pg_get_functiondef
2011-05-02 16:52 OID for pg_get_functiondef jtkells@verizon.net
@ 2011-05-02 17:15 ` Raghavendra <raghavendra.rao@enterprisedb.com>
1 sibling, 0 replies; 4+ messages in thread
From: Raghavendra @ 2011-05-02 17:15 UTC (permalink / raw)
To: jtkells@verizon.net; +Cc: pgsql-admin
select oid,proname from pg_proc where proname='function-name';
Best Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/
On Mon, May 2, 2011 at 10:22 PM, <jtkells@verizon.net> wrote:
> I've just started working on an 8.4 database and I have been asked to
> extract all the functions source code stored in various databases and
> schemas so they can be put into a repository for the developers. I'm
> planning to use pg_get_functiondef(OID) but I am having a hard time
> finding the OID for functions. I've looked into the
> information_schema and the pg_catalog schemas and have found
> information on functions but none of them seem to have the OID of the
> function. Can anyone please tell how to get the OID for a function
> within a schema and or if there is a better way.
>
> Thanks
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: OID for pg_get_functiondef
2011-05-02 16:52 OID for pg_get_functiondef jtkells@verizon.net
@ 2011-05-02 17:23 ` Thomas Kellerer <spam_eater@gmx.net>
2011-05-02 17:32 ` Re: OID for pg_get_functiondef Raghavendra <raghavendra.rao@enterprisedb.com>
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Kellerer @ 2011-05-02 17:23 UTC (permalink / raw)
To: pgsql-admin
jtkells@verizon.net wrote on 02.05.2011 18:52:
> I've just started working on an 8.4 database and I have been asked to
> extract all the functions source code stored in various databases and
> schemas so they can be put into a repository for the developers. I'm
> planning to use pg_get_functiondef(OID) but I am having a hard time
> finding the OID for functions. I've looked into the
> information_schema and the pg_catalog schemas and have found
> information on functions but none of them seem to have the OID of the
> function. Can anyone please tell how to get the OID for a function
> within a schema and or if there is a better way.
>
> Thanks
>
select pg_function_def(oid)
from pg_proc
where proname = 'your_function'
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: OID for pg_get_functiondef
2011-05-02 16:52 OID for pg_get_functiondef jtkells@verizon.net
2011-05-02 17:23 ` Re: OID for pg_get_functiondef Thomas Kellerer <spam_eater@gmx.net>
@ 2011-05-02 17:32 ` Raghavendra <raghavendra.rao@enterprisedb.com>
0 siblings, 0 replies; 4+ messages in thread
From: Raghavendra @ 2011-05-02 17:32 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-admin
On Mon, May 2, 2011 at 10:53 PM, Thomas Kellerer <spam_eater@gmx.net> wrote:
> jtkells@verizon.net wrote on 02.05.2011 18:52:
>
> I've just started working on an 8.4 database and I have been asked to
>> extract all the functions source code stored in various databases and
>> schemas so they can be put into a repository for the developers. I'm
>> planning to use pg_get_functiondef(OID) but I am having a hard time
>> finding the OID for functions. I've looked into the
>> information_schema and the pg_catalog schemas and have found
>> information on functions but none of them seem to have the OID of the
>> function. Can anyone please tell how to get the OID for a function
>> within a schema and or if there is a better way.
>>
>> Thanks
>>
>>
> select pg_function_def(oid)
> from pg_proc
> where proname = 'your_function'
>
>
>
Small correction..
select pg_get_functiondef(oid) from pg_proc where proname = 'your_function'
Best Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-05-02 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 16:52 OID for pg_get_functiondef jtkells@verizon.net
2011-05-02 17:15 ` Re: OID for pg_get_functiondef Raghavendra <raghavendra.rao@enterprisedb.com>
2011-05-02 17:23 ` Thomas Kellerer <spam_eater@gmx.net>
2011-05-02 17:32 ` Re: OID for pg_get_functiondef Raghavendra <raghavendra.rao@enterprisedb.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox