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

From Damon Fasching
Subject Re: How does one determine which columns are constrained PRIMARY KEY?
Date
Msg-id Pine.SOL.3.96.1020228113630.6654A-100000@design.lbl.gov
Whole thread Raw
In response to Re: How does one determine which columns are  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-novice
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



pgsql-novice by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Migrate an Oracle Table with CLOB datatype
Next
From: Tom Lane
Date:
Subject: Re: ElseIF in PLPGSQL