[Please copy the mailing list on replies.]
On Fri, Jun 24, 2005 at 05:52:46PM +0300, Marik wrote:
>
> But what i really need is field this constraint belongs to then...
> I'd like to have such result:
> CREATE TABLE foo (id integer PRIMARY KEY);
> CREATE TABLE bar (fooid integer NOT NULL REFERENC
On Thu, Jun 23, 2005 at 10:11:15PM -0700, mrix wrote:
>
> But I've already tried this approach, and it's not quite i need.
> Because as i understand foreign keys are built on indexes, so i get
> *index* and corresponding foreign key definition.
> Well then i have to find out what filed this index "
Yeah, thanks!
But I've already tried this approach, and it's not quite i need.
Because as i understand foreign keys are built on indexes, so i get
*index* and corresponding foreign key definition.
Well then i have to find out what filed this index "belongs to"
(assuming 1 field - 1 index)
---
On Thu, Jun 23, 2005 at 01:34:28AM -0700, mrix wrote:
>
> I'd like to know how can i get list of fields and corresponding foreign
> keys (referenced table and field).
For individual tables, client interfaces usually have a way to show
the table definition. In psql, for example, you can use "\d t