Re: How relate pg_class to pg_constraint

From: Bill Todd <pg(at)dbginc(dot)com>
To: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How relate pg_class to pg_constraint
Date: 2009-01-29 22:08:50
Message-ID: 498228F2.3010109@dbginc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bill Todd wrote:
> I need to join pg_class and pg_constraint to get information about
> constraints on a table. It appears that pg_constraint.conrelid is the
> foreign key but I do not see a relid column in pg_class. What
> column(s) define the relationship between these tables? Thanks.
>
> Bill
>
Is the relationship pg_constraint.conrelid = pg_class.oid? I assume the
column lists for the system tables do not include the oid column because
everyone (but us newbies) knows that every system table has an oid
column.<g>

Bill

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2009-01-29 22:13:27 Re: How relate pg_class to pg_constraint
Previous Message Bill Todd 2009-01-29 22:00:37 How relate pg_class to pg_constraint