pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Retreiving Table info
3+ messages / 2 participants
[nested] [flat]

* Retreiving Table info
@ 1999-05-25 11:52 Alex Turner <aturner@maaco.com>
  1999-05-25 13:08 ` Re: [INTERFACES] Retreiving Table info Herouth Maoz <herouth@oumail.openu.ac.il>
  0 siblings, 1 reply; 3+ messages in thread

From: Alex Turner @ 1999-05-25 11:52 UTC (permalink / raw)
  To: pgsql-interfaces

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] Retreiving Table info
  1999-05-25 11:52 Retreiving Table info Alex Turner <aturner@maaco.com>
@ 1999-05-25 13:08 ` Herouth Maoz <herouth@oumail.openu.ac.il>
  1999-05-25 13:16   ` Re: [INTERFACES] Retreiving Table info Alex Turner <aturner@maaco.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Herouth Maoz @ 1999-05-25 13:08 UTC (permalink / raw)
  To: Alex Turner <aturner@maaco.com>; pgsql-interfaces

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] Retreiving Table info
  1999-05-25 11:52 Retreiving Table info Alex Turner <aturner@maaco.com>
  1999-05-25 13:08 ` Re: [INTERFACES] Retreiving Table info Herouth Maoz <herouth@oumail.openu.ac.il>
@ 1999-05-25 13:16   ` Alex Turner <aturner@maaco.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Alex Turner @ 1999-05-25 13:16 UTC (permalink / raw)
  To: Herouth Maoz <herouth@oumail.openu.ac.il>; +Cc: pgsql-interfaces

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-05-25 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-25 11:52 Retreiving Table info Alex Turner <aturner@maaco.com>
1999-05-25 13:08 ` Herouth Maoz <herouth@oumail.openu.ac.il>
1999-05-25 13:16   ` Alex Turner <aturner@maaco.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox