Re: how to find foreign key details (column, that is)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to find foreign key details (column, that is)
Date: 2009-02-07 15:01:41
Message-ID: 200902071501.n17F1fn14347@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Karsten Hilbert wrote:
> On Wed, Jan 21, 2009 at 01:49:44PM -0500, Bruce Momjian wrote:
>
> > Tom Lane wrote:
> > > Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> writes:
> > > > This is what my 8.3 manual says:
> > >
> > > > conkey ? int2[] ? pg_attribute.attnum ? If a table constraint, list of columns which the constraint constrains ?
> > >
> > > > From that I wouldn't have figured it'd apply to foreign keys
> > > > as well. So I assume it is fair to say that "foreign keys
> > > > are one type of table constraint", right ?
> > >
> > > Right. I think what the comment is actually trying to point out is that
> > > conkey isn't relevant to domain constraints, which also appear in
> > > pg_constraint.
> >
> > Can someone come up with better documentation wording for conkey? I
> > can't:
> >
> > http://developer.postgresql.org/pgdocs/postgres/catalog-pg-constraint.html
>
> How about adding a second line:
>
> "Note: since foreign keys are table constraints, applies to those, too."
>
> or
>
> "If a foreign key, list of columns referencing the target table"
>
> (note, "referencing" as opposed to "referenced by" as in confkey)

I went a different direction with the documentation; I simplified the
wording and made it more explicit; attached and applied.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 1.1 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Iñigo Barandiaran 2009-02-07 15:40:54 Install Postgre while installing Other software.
Previous Message Alain Roger 2009-02-07 14:35:14 Re: column name with plpgsql