Обсуждение: Where are PL/pgSQL functions stored?

Поиск
Список
Период
Сортировка

Where are PL/pgSQL functions stored?

От
david_shadovitz@xontech.com (David Shadovitz)
Дата:
Where are PL/pgSQL functions stored?  I want to retrieve the text of a
function that I've created.

Thanks.
-David

Re: Where are PL/pgSQL functions stored?

От
Alvaro Herrera
Дата:
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)

Re: Where are PL/pgSQL functions stored?

От
Pavel Stehule
Дата:
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
>


Re: Where are PL/pgSQL functions stored?

От
david_shadovitz@xontech.com (David Shadovitz)
Дата:
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.

Re: Where are PL/pgSQL functions stored?

От
David Shadovitz
Дата:
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.