Re: How to list ALL PostgreSQL functions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to list ALL PostgreSQL functions?
Дата
Msg-id 19291.1473681414@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to list ALL PostgreSQL functions?  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: How to list ALL PostgreSQL functions?  (Poul Kristensen <bcc5226@gmail.com>)
Список pgsql-admin
hubert depesz lubaczewski <depesz@depesz.com> writes:
> \df gives you list of user functions. you can add more parameters, to
> limit/extend the list.
> like:
> \df pg_*
> will list all functions (including system one) that start with pg_
> \dfS
> will list all system functions
> \df+ *xlog*
> will list all functions (including system) that contain "xlog" in their
> name, with some additional columns, which include "description" - one
> line info about the function.

Also, you can make your own queries on pg_proc, which is all that psql is
doing here.  A nice abbreviated form is

select oid::regprocedure, obj_description(oid, 'pg_proc') from pg_proc;

which gives you just the name, arg types, and comment for each row.

Keep in mind that

1. This will show you an awful lot of stuff that's not meant to be called
directly from SQL, eg I/O functions, operator implementation functions,
aggregate support functions, cast functions, index support functions.
I count 2831 rows in pg_proc in a virgin installation as of HEAD, and
probably not even 1000 of them are really meant to be called as functions
in ordinary queries.

2. This will not show you some things that look like functions but are
implemented by special grammar productions.  For that you'd have to
look into src/backend/parser/gram.y.

            regards, tom lane


В списке pgsql-admin по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: How to list ALL PostgreSQL functions?
Следующее
От: "ben.play"
Дата:
Сообщение: My pg_xlog directory is becoming huge !?