Thread: How to find SQL Functions

How to find SQL Functions

From
"G. Anthony Reina"
Date:
I found in the on-line manuals a listing of the math, string, etc.
functions for PostgreSQL. However, I know that there are more than those
listed in the manual.

Is there some PSQL command to list all of the functions that PostgreSQL
recognizes?

Thanks.
-Tony




Re: [SQL] How to find SQL Functions

From
"Ross J. Reedstrom"
Date:
G. Anthony Reina wrote:
> 
> I found in the on-line manuals a listing of the math, string, etc.
> functions for PostgreSQL. However, I know that there are more than those
> listed in the manual.
> 
> Is there some PSQL command to list all of the functions that PostgreSQL
> recognizes?
> 

functions:
\df [optional function name glob]

operators (there are some weird ones):
\do [opt glob]

you may want to use \o filename to redirect output to a file, then you
can use "grep" and such tools to find functs, etc. based on param types
and description text.

(there are, of course, equivalent SQL statements, that do the same thing
as the above psql convienience functions, using the appropriate system
tables (pg_*), which would allow one to avoid files and grep. But for
learning, there's a catch-22, and I already knew how to use grep ;-)

Ross

-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


Re: [SQL] How to find SQL Functions

From
Tom Lane
Date:
"Ross J. Reedstrom" <reedstrm@rice.edu> writes:
> \df [optional function name glob]
> (there are, of course, equivalent SQL statements, that do the same thing
> as the above psql convienience functions, using the appropriate system
> tables (pg_*), which would allow one to avoid files and grep. But for
> learning, there's a catch-22, and I already knew how to use grep ;-)

BTW, 6.5 psql has a new command-line switch option -E, which causes it
to display the SQL statements that it issues to carry out special
commands like \df.  Makes a great learning tool when you want to see
what the system tables contain.
        regards, tom lane