Re: How does one determine which columns are constrained PRIMARY KEY? - Mailing list pgsql-novice

From denis@coralindia.com
Subject Re: How does one determine which columns are constrained PRIMARY KEY?
Date
Msg-id 008501c1c0e2$b6ae4260$0232a8c0@coralindia.com
Whole thread Raw
In response to Re: How does one determine which columns are constrained PRIMARY KEY?  (Damon Fasching <fasching@design.lbl.gov>)
List pgsql-novice
I am a novice for PostGres... but if you start postgres with option "-E" it
shows the QUERY which it executes to get result of each "\" command....

Analysing that, you may find something relevant to your prob.


Denis


----- Original Message -----
From: "Damon Fasching" <fasching@design.lbl.gov>
To: <pgsql-novice@postgresql.org>
Sent: Friday, March 01, 2002 1:11 AM
Subject: Re: [NOVICE] How does one determine which columns are constrained
PRIMARY KEY?


> On Thu, 28 Feb 2002, Josh Berkus wrote:
>
> > Damon,
> >
> > > Is it possible to determine which column(s), if any, are constrained
> > > with PRIMARY KEY?
> >
> > From psql, use:
> >
> > \d table_name
> >
> > You will get a list of table characteristics, including any
> >  constraints.
> >
> > -Josh
> >
>
> Thanks...but is there a way to check PRIMARY KEY (and do other useful
> things like get a listing of databases) from within an SQL query?  I can't
> embed psql '\' commands in my application.
>
> Damon
>
> ---------
>
> May the lights in The Land of Plenty
>   shine on the Truth some day L Cohen
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org


pgsql-novice by date:

Previous
From: Herb Blacker
Date:
Subject: Re: No column headings in SQL query
Next
From: Bertil Wergelius
Date:
Subject: sorting order