pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to list ALL PostgreSQL functions?
9+ messages / 5 participants
[nested] [flat]
* How to list ALL PostgreSQL functions?
@ 2016-09-12 10:25 Poul Kristensen <bcc5226@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Poul Kristensen @ 2016-09-12 10:25 UTC (permalink / raw)
To: pgsql-admin
Hi !
How do I get an overview of all functions in the PG api
e.g. :
posgres=# SELECT pg_last_xlog_receive_location();
postgres=# SELECT pg_current_xlog_location();
In my opinion it is not obvious how to list all pg_* functions.
Can anyone help?
Thanks
Poul
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 10:31 Vladimir Borodin <root@simply.name>
parent: Poul Kristensen <bcc5226@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Borodin @ 2016-09-12 10:31 UTC (permalink / raw)
To: Poul Kristensen <bcc5226@gmail.com>; +Cc: pgsql-admin
> 12 сент. 2016 г., в 13:25, Poul Kristensen <bcc5226@gmail.com> написал(а):
>
>
> Hi !
>
> How do I get an overview of all functions in the PG api
>
> e.g. :
>
> posgres=# SELECT pg_last_xlog_receive_location();
>
> postgres=# SELECT pg_current_xlog_location();
>
> In my opinion it is not obvious how to list all pg_* functions.
>
> Can anyone help?
\df pg_* in psql?
>
> Thanks
>
> Poul
>
>
>
>
>
>
>
>
>
--
May the force be with you…
https://simply.name
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 10:46 Poul Kristensen <bcc5226@gmail.com>
parent: Vladimir Borodin <root@simply.name>
0 siblings, 1 reply; 9+ messages in thread
From: Poul Kristensen @ 2016-09-12 10:46 UTC (permalink / raw)
To: pgsql-admin
Sorry for not clear speach!
It seems that all functions have the prefix off pg_.
I want to list all functions maybe with a short description in the PG api
E.g.
some command listing
pg_last_xlog_receive
pg_current_xlog_location
etc.
the \df
does not help in the case.
Thanks
Poul
2016-09-12 12:31 GMT+02:00 Vladimir Borodin <root@simply.name>:
>
> 12 сент. 2016 г., в 13:25, Poul Kristensen <bcc5226@gmail.com> написал(а):
>
>
> Hi !
>
> How do I get an overview of all functions in the PG api
>
> e.g. :
>
> posgres=# SELECT pg_last_xlog_receive_location();
>
> postgres=# SELECT pg_current_xlog_location();
>
> In my opinion it is not obvious how to list all pg_* functions.
>
> Can anyone help?
>
>
> \df pg_* in psql?
>
>
> Thanks
>
> Poul
>
>
>
>
>
>
>
>
>
>
>
> --
> May the force be with you…
> https://simply.name
>
>
--
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 10:56 hubert depesz lubaczewski <depesz@depesz.com>
parent: Poul Kristensen <bcc5226@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: hubert depesz lubaczewski @ 2016-09-12 10:56 UTC (permalink / raw)
To: Poul Kristensen <bcc5226@gmail.com>; +Cc: pgsql-admin
On Mon, Sep 12, 2016 at 12:46:38PM +0200, Poul Kristensen wrote:
> Sorry for not clear speach!
>
> It seems that all functions have the prefix off pg_.
>
> I want to list all functions maybe with a short description in the PG api
>
> E.g.
>
> some command listing
>
> pg_last_xlog_receive
> pg_current_xlog_location
> etc.
>
> the \df
> does not help in the case.
Check the docs.
psql \df shows you list of functions.
Description can be found in manual.
Start with:
https://www.postgresql.org/docs/current/static/bookindex.html#AEN182285
and then, click on appropriate function.
For example, link for pg_last_xlog_receive_location is
https://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL
and pg_current_xlog_location is
https://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-BACKUP
Best regards,
depesz
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 11:11 Poul Kristensen <bcc5226@gmail.com>
parent: hubert depesz lubaczewski <depesz@depesz.com>
0 siblings, 1 reply; 9+ messages in thread
From: Poul Kristensen @ 2016-09-12 11:11 UTC (permalink / raw)
To: pgsql-admin
Thanks a lot.for links :)
btw:
psql \df gives
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+------+------------------+---------------------+------
(0 rows)
/Poul
2016-09-12 12:56 GMT+02:00 hubert depesz lubaczewski <depesz@depesz.com>:
> On Mon, Sep 12, 2016 at 12:46:38PM +0200, Poul Kristensen wrote:
> > Sorry for not clear speach!
> >
> > It seems that all functions have the prefix off pg_.
> >
> > I want to list all functions maybe with a short description in the PG api
> >
> > E.g.
> >
> > some command listing
> >
> > pg_last_xlog_receive
> > pg_current_xlog_location
> > etc.
> >
> > the \df
> > does not help in the case.
>
> Check the docs.
>
> psql \df shows you list of functions.
>
> Description can be found in manual.
>
> Start with:
> https://www.postgresql.org/docs/current/static/bookindex.html#AEN182285
>
> and then, click on appropriate function.
>
> For example, link for pg_last_xlog_receive_location is
> https://www.postgresql.org/docs/current/static/functions-
> admin.html#FUNCTIONS-RECOVERY-CONTROL
>
> and pg_current_xlog_location is
> https://www.postgresql.org/docs/current/static/functions-
> admin.html#FUNCTIONS-ADMIN-BACKUP
>
> Best regards,
>
> depesz
>
>
--
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 11:22 hubert depesz lubaczewski <depesz@depesz.com>
parent: Poul Kristensen <bcc5226@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: hubert depesz lubaczewski @ 2016-09-12 11:22 UTC (permalink / raw)
To: Poul Kristensen <bcc5226@gmail.com>; +Cc: pgsql-admin
On Mon, Sep 12, 2016 at 01:11:11PM +0200, Poul Kristensen wrote:
> Thanks a lot.for links :)
>
> btw:
>
> psql \df gives
\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.
Best regards,
depesz
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 11:56 Tom Lane <tgl@sss.pgh.pa.us>
parent: hubert depesz lubaczewski <depesz@depesz.com>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2016-09-12 11:56 UTC (permalink / raw)
To: depesz@depesz.com; +Cc: 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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-12 18:00 Poul Kristensen <bcc5226@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 9+ messages in thread
From: Poul Kristensen @ 2016-09-12 18:00 UTC (permalink / raw)
To: pgsql-admin
Thanks a lot.
How to size HW resources on a physical server for PG95+?
What does PG95+ like? Cpu? L1(expensive I think) 2 or 3 cache level?. RAM?
Any idea?
Thanks
Poul
2016-09-12 13:56 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:
> 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
>
--
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: How to list ALL PostgreSQL functions?
@ 2016-09-13 10:33 jaime soler <jaime.soler@gmail.com>
parent: Poul Kristensen <bcc5226@gmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: jaime soler @ 2016-09-13 10:33 UTC (permalink / raw)
To: Poul Kristensen <bcc5226@gmail.com>; pgsql-admin
El lun, 12-09-2016 a las 20:00 +0200, Poul Kristensen escribió:
>
> Thanks a lot.
>
> How to size HW resources on a physical server for PG95+?
Please create a new thread and try to avoid mixing subjects
>
> What does PG95+ like? Cpu? L1(expensive I think) 2 or 3 cache level?.
> RAM?
>
> Any idea?
>
> Thanks
>
> Poul
>
>
>
> 2016-09-12 13:56 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:
> > 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
> >
>
>
> --
> Med venlig hilsen / Best regards
> Poul Kristensen
> Linux-OS/Virtualizationexpert and Oracle DBA
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2016-09-13 10:33 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 10:25 How to list ALL PostgreSQL functions? Poul Kristensen <bcc5226@gmail.com>
2016-09-12 10:31 ` Vladimir Borodin <root@simply.name>
2016-09-12 10:46 ` Poul Kristensen <bcc5226@gmail.com>
2016-09-12 10:56 ` hubert depesz lubaczewski <depesz@depesz.com>
2016-09-12 11:11 ` Poul Kristensen <bcc5226@gmail.com>
2016-09-12 11:22 ` hubert depesz lubaczewski <depesz@depesz.com>
2016-09-12 11:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-12 18:00 ` Poul Kristensen <bcc5226@gmail.com>
2016-09-13 10:33 ` jaime soler <jaime.soler@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox