Thread: list tables Examples

list tables Examples

From
"Luiz Rafael Culik Guimaraes"
Date:
Dear Friend

I searched all postgresql page and didn´t find.
How to get all tables associated with an Database with C API.
as Mysql api mysql_list_tables

[]´s

Luiz Rafael Culik
http://sites.uol.com.br/culikr



Re: list tables Examples

From
Alvaro Herrera
Date:
Luiz Rafael Culik Guimaraes dijo:

> How to get all tables associated with an Database with C API.

Use a standard query against pg_class system table, or (probably better)
pg_tables system view.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Postgres is bloatware by design: it was built to house
 PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)


Re: list tables Examples

From
am@fx.ro
Date:
On Tue, Aug 13, 2002 at 01:25:44PM -0300, Luiz Rafael Culik Guimaraes wrote:
> Dear Friend
>
> I searched all postgresql page and didn´t find.
> How to get all tables associated with an Database with C API.
> as Mysql api mysql_list_tables

You'll have to fetch the results of a query like:

select tablename from pg_tables

or

select tablename from pg_tables where not tableowner='postgres'


Adrian Maier
(am@fx.ro)