getting information of tables and indexes

Started by srikanthutpalaabout 21 years ago4 messagesgeneral
Jump to latest
#1srikanthutpala
srikanthutpala@virinchi.com

Hi

I am Srikanth. I want to get the information about all
tables in the existing postgresql . I want list all the tables and its
columns information by executing a simple SQL statement like in oracle. We
have a view like "user_tab_columns" in oracle to get all the information of
the tables of a user. Can we have nay option like this in postgresql can u
help out in this.

And also I want to get all constraints in the database and also
respective parent tables and parent columns for the referential constrains.
Please help in this issues.

I will be thankful to you for your helping in this

Regards,

Srikanth.Utpala

Attachments:

image001.jpgimage/jpeg; name=image001.jpgDownload
#2Sean Davis
sdavis2@mail.nih.gov
In reply to: srikanthutpala (#1)
Re: getting information of tables and indexes

You can query the information schema:

http://www.postgresql.org/docs/8.0/static/information-schema.html

More specifically:

http://www.postgresql.org/docs/8.0/static/infoschema-columns.html

Hope that answers your question.

Sean

----- Original Message -----
From: Srikanth Utpala (Virinchi)
To: pgsql-general@PostgreSQL.org
Sent: Friday, April 01, 2005 1:42 AM
Subject: [GENERAL] getting information of tables and indexes

Hi

I am Srikanth. I want to get the information about all tables in the existing postgresql . I want list all the tables and its columns information by executing a simple SQL statement like in oracle. We have a view like "user_tab_columns" in oracle to get all the information of the tables of a user. Can we have nay option like this in postgresql can u help out in this.

And also I want to get all constraints in the database and also respective parent tables and parent columns for the referential constrains. Please help in this issues.

I will be thankful to you for your helping in this

Regards,

Srikanth.Utpala

------------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#3Paul Tillotson
pntil@shentel.net
In reply to: srikanthutpala (#1)
Re: getting information of tables and indexes

SELECT * FROM information_schema.tables;
SELECT * FROM information_schema.columns;

These should have most of the information you need.

Regards,
Paul Tillotson

Srikanth Utpala (Virinchi) wrote:

Show quoted text

Hi

I am Srikanth. I want to get the information about all tables in the
existing postgresql . I want list all the tables and its columns
information by executing a simple SQL statement like in oracle. We
have a view like �user_tab_columns� in oracle to get all the
information of the tables of a user. Can we have nay option like this
in postgresql can u help out in this.

And also I want to get all constraints in the database and also
respective parent tables and parent columns for the referential
constrains. Please help in this issues.

I will be thankful to you for your helping in this

Regards,

**Srikanth.Utpala**

#4srikanthutpala
srikanthutpala@virinchi.com
In reply to: Sean Davis (#2)
Re: getting information of tables and indexes

hi
I am srikanth we are r using postgresql. we are getting
the fallowing error

com.ibm.ivj.eab.dab.DAException: SELECT_FAILED Unable to load DAMessages
ResourceBundle.
Invalid character data was found. This is most likely caused by stored data
containing characters that are invalid for the character set the database
was created in. The most common example of this is storing 8bit data in a
SQL_ASCII database.

Can your telll me the reasions for this and possi able solution for this .
I am very thank full if your help me in this issue

Regareds
srikanth.

_____

From: Sean Davis [mailto:sdavis2@mail.nih.gov]
Sent: Sunday, April 03, 2005 5:28 AM
To: Srikanth Utpala (Virinchi); pgsql-general@PostgreSQL.org
Subject: Re: [GENERAL] getting information of tables and indexes

You can query the information schema:

http://www.postgresql.org/docs/8.0/static/information-schema.html

More specifically:

http://www.postgresql.org/docs/8.0/static/infoschema-columns.html

Hope that answers your question.

Sean

----- Original Message -----
From: Srikanth Utpala (Virinchi) <mailto:SrikanthUtpala@virinchi.com>
To: pgsql-general@PostgreSQL.org
Sent: Friday, April 01, 2005 1:42 AM
Subject: [GENERAL] getting information of tables and indexes

Hi

I am Srikanth. I want to get the information about all
tables in the existing postgresql . I want list all the tables and its
columns information by executing a simple SQL statement like in oracle. We
have a view like "user_tab_columns" in oracle to get all the information of
the tables of a user. Can we have nay option like this in postgresql can u
help out in this.

And also I want to get all constraints in the database and also
respective parent tables and parent columns for the referential constrains.
Please help in this issues.

I will be thankful to you for your helping in this

Regards,

Srikanth.Utpala

_____

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)