Re: What query on system tables retrieves table or queries definitoin

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: lists(at)adontendev(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What query on system tables retrieves table or queries definitoin
Date: 2006-03-04 21:47:48
Message-ID: 20060304214748.GG29180@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Mar 04, 2006 at 03:13:18AM +0000, lists(at)adontendev(dot)net wrote:
>
>
> What is the query for retrieving a tables and a views definition from the system
> tables (in 7.4).
>
> I am trying to find my way in the system tables and I am finding very confusing,
> especially way in the way the tables are linked.

If you start psql with the -E switch or use "\set ECHO_HIDDEN = 'on'"
then the \d command print the queries used to generate the output. This
should give you a good start. Alternativly, use the information_schema.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-03-04 21:50:35 Re: Questions about privileges
Previous Message William Penberthy 2006-03-04 17:43:41 Re: Using same database from XP and Linux in notebook