Re: [GENERAL] About table schema

2004-05-26 Thread Peter Eisentraut
Wei Shi wrote: > Hi, does anyone know how to get the schema information > of a table. More specifically, I would like to know > > 1. which field(s) are primary keys? > 2. the data type of each field of a table? > 3. If a field is a foreign key, what field/table it > is referring to. Use the infor

Re: [GENERAL] About table schema

2004-05-26 Thread Richard Huxton
Wei Shi wrote: This is great. Thanks. There is also the information schema in 7.4, e.g. "SELECT * FROM information_schema.tables" There's not as much detail there, but it's supposed to be standard across different database systems. -- Richard Huxton Archonet Ltd ---

Re: [GENERAL] About table schema

2004-05-25 Thread Wei Shi
This is great. Thanks. Wei --- Mike Mascari <[EMAIL PROTECTED]> wrote: > Wei Shi wrote: > > Is there a function interface to get this > information > > other than from "psql" comman line interface? > > If you start psql with the '-E' switch, you'll see > the queries it > generates to display t

Re: [GENERAL] About table schema

2004-05-25 Thread Mike Mascari
Wei Shi wrote: Is there a function interface to get this information other than from "psql" comman line interface? If you start psql with the '-E' switch, you'll see the queries it generates to display the meta-data associated with the '\' command you issue. You may also query the tables and vie

Re: [GENERAL] About table schema

2004-05-25 Thread Wei Shi
Is there a function interface to get this information other than from "psql" comman line interface? Thanks. Wei --- Janning Vygen <[EMAIL PROTECTED]> wrote: > Am Mittwoch, 26. Mai 2004 00:36 schrieb Wei Shi: > > Hi, does anyone know how to get the schema > information > > of a table. More speci

Re: [GENERAL] About table schema

2004-05-25 Thread Janning Vygen
Am Mittwoch, 26. Mai 2004 00:36 schrieb Wei Shi: > Hi, does anyone know how to get the schema information > of a table. More specifically, I would like to know > > 1. which field(s) are primary keys? > 2. the data type of each field of a table? > 3. If a field is a foreign key, what field/table it