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

Re: data dictionary?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Beth Gatewood <bethg(at)mbt(dot)washington(dot)edu>
Cc: "D(dot) Duccini" <duccini(at)backpack(dot)com>, pgsql-novice(at)hub(dot)org
Subject: Re: data dictionary?
Date: 2000-10-19 01:40:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Beth Gatewood <bethg(at)mbt(dot)washington(dot)edu> writes:
> I would really like to write some code that would be able to query any
> database, grab out the tables and then do a row count on each table.
> Obviously I could do this by hand, singly executing \dt but this will
> be taking a long time.

psql's backslash commands don't do anything you couldn't do for
yourself.  To see what they're doing, start psql with -E switch to
make it echo the SQL commands it's sending.

One thing you do have to watch out for is that details of the system
catalogs tend to change from release to release, so if you do anything
too fancy you might find it broken at some point in the future...

			regards, tom lane

In response to


pgsql-novice by date

Next:From: D. DucciniDate: 2000-10-19 05:35:24
Subject: Re: changing data type
Previous:From: Tom LaneDate: 2000-10-19 01:18:49
Subject: Re: Stupid question: concatenating strings

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