Обсуждение: How can we see details of function in psql prompt

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

How can we see details of function in psql prompt

От
AmitKumar Jain
Дата:
Hi,

1. Could any one please suggest me that how can I see the details of
function through psql prompt.
2. We can use cactii as a monitoring tool for mysql what is the similar
monitoring tool except nagios  for postgreSQL


Thankx in Advance
Amit

Re: How can we see details of function in psql prompt

От
AmitKumar Jain
Дата:
admin=# \x
Expanded display is on.
admin=# select * from pg_proc where proname = 'abstime';
-[ RECORD 1 ]--+--------------------
proname        | abstime
pronamespace   | 11
proowner       | 10
prolang        | 12
procost        | 1
prorows        | 0
proisagg       | f
prosecdef      | f



its only showing the information about the function not what exactly
written insdie the function. I need to know the definition of function
through psql prompt.


Hoover, Jeffrey wrote:
> 1. assuming a function named "appendrows"
>
>    select * from pg_proc where proname='appendrows';
>
>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of AmitKumar Jain
> Sent: Monday, December 08, 2008 3:41 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] How can we see details of function in psql prompt
>
> Hi,
>
> 1. Could any one please suggest me that how can I see the details of
> function through psql prompt.
> 2. We can use cactii as a monitoring tool for mysql what is the similar
> monitoring tool except nagios  for postgreSQL
>
>
> Thankx in Advance
> Amit
>
>

Re: How can we see details of function in psql prompt

От
"Milen A. Radev"
Дата:
AmitKumar Jain написа:
> Hi,
>
> 1. Could any one please suggest me that how can I see the details of
> function through psql prompt.
[...]

\df+

(http://www.postgresql.org/docs/current/static/app-psql.html)


--
Milen A. Radev

Re: How can we see details of function in psql prompt

От
AmitKumar Jain
Дата:
Hi,

\df will only give information aboutt its owner,argument,return type not
its complete definition.

I need to know the definition of function "record_part('test)"  through
psql prompt  so is there any way to see it from psql prompt.

Milen A. Radev wrote:
> AmitKumar Jain написа:
>
>> Hi,
>>
>> 1. Could any one please suggest me that how can I see the details of
>> function through psql prompt.
>>
> [...]
>
> \df+
>
> (http://www.postgresql.org/docs/current/static/app-psql.html)
>
>
>

Re: How can we see details of function in psql prompt

От
"Kevin Grittner"
Дата:
>>> AmitKumar Jain <amitjain@synechron.com> wrote:
> Milen A. Radev wrote:
>> AmitKumar Jain ******:
>>> 1. Could any one please suggest me that how can I see the details
of
>>> function through psql prompt.

>> \df+
>>
>> (http://www.postgresql.org/docs/current/static/app-psql.html)

> \df will only give information aboutt its owner,argument,return type
not
> its complete definition.

Not \df alone, use \df+

"If the form \df+ is used, additional information about each function,
including volatility, language, source code and description, is
shown."

From the URL cited by Milen.

-Kevin