Thread: Retreiving Table info

Retreiving Table info

From
Alex Turner
Date:
update: Thanks for all your help, I finaly got it working - looks like I
was modifiying the wrong config file (for some reason there was a
duplicate, and I was modifying that one erk!)

I can create tables and perform SQL statements just great :),

however.. is it possible to open a connection to the database and
determine what tables are in the database already?

TIA,

Alex T



Re: [INTERFACES] Retreiving Table info

From
Herouth Maoz
Date:
At 14:52 +0300 on 25/05/1999, Alex Turner wrote:


>
> however.. is it possible to open a connection to the database and
> determine what tables are in the database already?

Of course. It's a query, just like any other query, but you select the data
from the system catalogs rather than your own tables. Take a look in the
documentation - the manpage for "catalogs".

The table you should query is probably pg_class.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




Re: [INTERFACES] Retreiving Table info

From
Alex Turner
Date:
Brilliant!  worked first time.  pg_class is the one!

I know that you can get the types from a database from the metadata, but I'm
wondering if there is also a way to issue to an SQL query to postgres that will
yield the same result.

Alex T

Herouth Maoz wrote:

> At 14:52 +0300 on 25/05/1999, Alex Turner wrote:
>
> >
> > however.. is it possible to open a connection to the database and
> > determine what tables are in the database already?
>
> Of course. It's a query, just like any other query, but you select the data
> from the system catalogs rather than your own tables. Take a look in the
> documentation - the manpage for "catalogs".
>
> The table you should query is probably pg_class.
>
> Herouth
>
> --
> Herouth Maoz, Internet developer.
> Open University of Israel - Telem project
> http://telem.openu.ac.il/~herutma



...

From
tperry@grumpy.it.as.ex.state.ut.us
Date:
unsubscribe