Thread: pg_class et el -little OT

pg_class et el -little OT

From
Anil Amarakoon
Date:
Hi All;

I just want query database and get the structures in in my application.

If I run select * from pg_class where tableowner='myname';
get all the tables tables created by me.

Is there any other place that I can get file names and sequnces??

like this
select * from pg_table where tableName=role;

will give you

Id    int
roleName    text  etc..

same kind of info for the sequence..

Thank you in advance for any replies.

awc


Re: pg_class et el -little OT

From
"Lars Stenberg"
Date:
Hi!

I guess you can find an answer on:
http://developer.postgresql.org/docs/postgres/catalogs.html

Please tell me if you could =9

Mvh
Lars

----- Original Message -----
From: "Anil Amarakoon" <awc@drytel.net>
To: <pgsql-jdbc@postgresql.org>
Sent: Monday, February 03, 2003 1:39 AM
Subject: [JDBC] pg_class et el -little OT


> Hi All;
>
> I just want query database and get the structures in in my application.
>
> If I run select * from pg_class where tableowner='myname';
> get all the tables tables created by me.
>
> Is there any other place that I can get file names and sequnces??
>
> like this
> select * from pg_table where tableName=role;
>
> will give you
>
> Id    int
> roleName    text  etc..
>
> same kind of info for the sequence..
>
> Thank you in advance for any replies.
>
> awc
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


Re: pg_class et el -little OT

From
Dave Cramer
Date:
You can just use DatabaseMetaData getTables and specify SEQUENCE to get
the sequence tables.

Dave
On Sun, 2003-02-02 at 19:39, Anil Amarakoon wrote:
> Hi All;
>
> I just want query database and get the structures in in my application.
>
> If I run select * from pg_class where tableowner='myname';
> get all the tables tables created by me.
>
> Is there any other place that I can get file names and sequnces??
>
> like this
> select * from pg_table where tableName=role;
>
> will give you
>
> Id    int
> roleName    text  etc..
>
> same kind of info for the sequence..
>
> Thank you in advance for any replies.
>
> awc
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
--
Dave Cramer <Dave@micro-automation.net>