pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: depesz@depesz.com
Cc: Poul Kristensen <bcc5226@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to list ALL PostgreSQL functions?
Date: Mon, 12 Sep 2016 07:56:54 -0400
Message-ID: <19291.1473681414@sss.pgh.pa.us> (raw)
In-Reply-To: <20160912112224.r4343jfzxiznoqpi@depesz.com>
References: <CAAOuvVqoDPW=jysJOjXZLc8yLsHSa=QDpnLLTqYMYiK+yE=QRg@mail.gmail.com>
<38EB733C-FDF1-4644-ACC9-49D0CA125F79@simply.name>
<CAAOuvVqJEEyGQS0iyoobRK5YVK9yTEi6xLMASjNBNLvBad2wZA@mail.gmail.com>
<20160912105651.43vut4eeaxk25rg3@depesz.com>
<CAAOuvVpxhi3G+o65gi+BEaX3bYxQLZusQKx5S=WGMe2pD+9P+Q@mail.gmail.com>
<20160912112224.r4343jfzxiznoqpi@depesz.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
view thread (9+ messages) latest in thread
Message-ID: <19291.1473681414@sss.pgh.pa.us> Permalink: ../19291.1473681414@sss.pgh.pa.us/ Also on: postgresql.org/message-id/19291.1473681414@sss.pgh.pa.us ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-admin@postgresql.org Cc: tgl@sss.pgh.pa.us, depesz@depesz.com, bcc5226@gmail.com Subject: Re: How to list ALL PostgreSQL functions? In-Reply-To: <19291.1473681414@sss.pgh.pa.us> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
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