473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Where are PL/pgSQL functions stored?

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
4 1943
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: FET | last post by:
Hello, I am in a bit of a conflict here. I would like to know if the stored procedures that I write in PL/PGSQL to run on PostgreSQL 7.4.2 are ANSI compliant. The point of asking this question is...
1
by: Victor Spång Arthursson | last post by:
Well, bought a new disk to my Powerbook yesterday and reinstalled Mac OS X. I'm in the middle of restoring everything now, and need to know where the database files where located. I thougt...
9
by: Thomas LeBlanc | last post by:
Is there a tool for designing databases(ERD to data Design) and being able to generate scripts or databases from the tool. Visio does a good job, but does not have a driver for PostgreSQL. The...
3
by: John Sidney-Woollett | last post by:
Is it possible to (automatically) force the reparse of a stored PL/pgSQL function following the deletion and recreation of an object that was referenced within the function (for example a table or...
9
by: Jerome Lyles | last post by:
Hello List, I have installed Postgresql 7.4 on a Suse 9.0 system using apt. I cannot do this: /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data Because there is no "/pgsql/bin/initdb"...
7
by: snpe | last post by:
Is it down ? regards ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's...
0
by: Eric Parusel | last post by:
Hello, I've got a C++ library I need to use, and I want to use it from a pgsql function. Would anyone happen to have any examples of how to accomplish something like this? I see examples of...
0
by: Matt | last post by:
I need an installation with Postgres support, and was happy to find in my phpinfo that there was a --with-pgsql=shared option in the config line. but I still got "call to undefined function:...
1
by: Shoma | last post by:
Hi, I have a function(stored procedure) in the database. I need to pass the table name which is a variable. How do i do that? Example : I have 1st table : table name - cities location | city ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.