By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,374 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,374 IT Pros & Developers. It's quick & easy.

Where are PL/pgSQL functions stored?

P: n/a
Where are PL/pgSQL functions stored? I want to retrieve the text of a
function that I've created.

Thanks.
-David
Nov 11 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Wed, Sep 17, 2003 at 10:32:57AM -0700, David Shadovitz wrote:
Where are PL/pgSQL functions stored? I want to retrieve the text of a
function that I've created.


In psql, try
\df+ your-function-name

Function bodies are in the pg_proc table, but the above trick should be
enough.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Hay que recordar que la existencia en el cosmos, y particularmente la
elaboración de civilizaciones dentre de él no son, por desgracia,
nada idílicas" (Ijon Tichy)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #2

P: n/a
Thanks to Alvaro H. and Joshua D. for pointing me to pg_proc.

The function I was looking for is an overloaded one, so in my query of
pg_proc I had to specify the signature of the one that I wanted.

My favorite page, for today:
http://www.postgresql.org/docs/7.3/static/catalogs.html

-David
Where are PL/pgSQL functions stored? I want to retrieve the text of a
function that I've created.

Nov 11 '05 #3

P: n/a
On 17 Sep 2003, David Shadovitz wrote:

Hello

http://www.varlena.com/varlena/GeneralBits/39.php

Section: Where's the Code?

Pavel

Where are PL/pgSQL functions stored? I want to retrieve the text of a
function that I've created.

Thanks.
-David

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05 #4

P: n/a
Pavel,

That's great! I had to modify the showfunctions view, but once I did, it
proved to be useful right away.

My mods:
1. I have no pg_namespace catalog, so I removed all references to it.
2. I have no pg_catalog, but I found that the call to oidvectortypes() works
fine with no scope specified.

Thanks.
-David

Pavel Stehule wrote:
On 17 Sep 2003, David Shadovitz wrote:

Hello

http://www.varlena.com/varlena/GeneralBits/39.php

Section: Where's the Code?

Pavel
Where are PL/pgSQL functions stored? I want to retrieve the text of a
function that I've created.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.