Skip site navigation (1) Skip section navigation (2)

Re: How to out \df to a file

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Craig <craig(at)mysoftforge(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to out \df to a file
Date: 2009-04-01 14:21:33
Message-ID: 200904011421.n31ELXR19579@momjian.us (view raw or flat)
Thread:
Lists: pgsql-novice
Craig wrote:
> Hello All,
> 
>  
> 
> I am trying to get a list of the functions built into postgreSQL.
> 
> I know to use the \df command w/n psql, but paging through that is painful.
> 
> Is there a way to send the \df output to a file?
> 
> Or is there a table/view (s) I could query?

psql -E will show you the query;  that is in the FAQ.

	$ psql -E test
	psql (8.4devel)
	Type "help" for help.
	
	test=> \df
	********* QUERY **********
	SELECT n.nspname as "Schema",
	  p.proname as "Name",
	  pg_catalog.pg_get_function_result(p.oid) as "Result data type",
	  pg_catalog.pg_get_function_arguments(p.oid) as "Argument data types"
	FROM pg_catalog.pg_proc p
	     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
	WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype
	      AND p.proargtypes[0] IS DISTINCT FROM
	'pg_catalog.cstring'::pg_catalog.regtype
	      AND NOT p.proisagg
	      AND n.nspname <> 'pg_catalog'
	  AND pg_catalog.pg_function_is_visible(p.oid)
	ORDER BY 1, 2, 4;
	**************************
	
	                   List of functions
	 Schema | Name | Result data type | Argument data types
	--------+------+------------------+---------------------
	(0 rows)

That is for Postgres 8.4.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-novice by date

Next:From: CraigDate: 2009-04-01 14:51:16
Subject: Re: [personal] Re: How to out \df to a file
Previous:From: Wright, GeorgeDate: 2009-04-01 14:17:38
Subject: Re: How to out \df to a file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group