Re: data dictionary? - Mailing list pgsql-novice

From Tom Lane
Subject Re: data dictionary?
Date
Msg-id 6990.971919600@sss.pgh.pa.us
Whole thread Raw
In response to Re: data dictionary?  (Beth Gatewood <bethg@mbt.washington.edu>)
Responses changing data type
List pgsql-novice
Beth Gatewood <bethg@mbt.washington.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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Stupid question: concatenating strings
Next
From: Chris
Date:
Subject: changing data type