How does one get names of all tables in a DB
How does one get names of all tables in a DB
От:
"Clay, Bruce" <bclay@ball.com>
Дата:
I have looked through all of the documentation could find and still can not find out how to get names of all tables in a specified DB.
Is there a way through libpq c interface or through a SQL message sent through pqexec to get a list of all of the tables in a given DB?
Bruce
Re: How does one get names of all tables in a DB
От:
Michael Fuhr <mike@fuhr.org>
Дата:
On Wed, Mar 16, 2005 at 05:41:39PM -0500, Clay, Bruce wrote: > I have looked through all of the documentation could find and still can > not find out how to get names of all tables in a specified DB. See the "System Catalogs" chapter. Here's a link to the latest version: http://www.postgresql.org/docs/8.0/interactive/catalogs.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/
Re: How does one get names of all tables in a DB
От:
Frank Bax <fbax@sympatico.ca>
Дата:
At 05:41 PM 3/16/05, Clay, Bruce wrote:I have looked through all of the documentation could find and still can not find out how to get names of all tables in a specified DB.
Is there a way through libpq c interface or through a SQL message sent through pqexec to get a list of all of the tables in a given DB?
Do you have access to CLI? Run psql with the -E option to show you the SQL behind any of its commands. Issue the \dt command to list tables. Process the SQL through your favourite interface.