| From: | "Tim Bruce" <pdxpug(at)tbruce(dot)com> |
|---|---|
| To: | "Brent Dombrowski" <brent(dot)dombrowski(at)gmail(dot)com> |
| Cc: | "Postgresql PDX_Users" <pdxpug(at)postgresql(dot)org> |
| Subject: | Re: Finding the Table for Check Constraint |
| Date: | 2012-05-08 17:22:48 |
| Message-ID: | 460990fc649b8101580d88565fec915c.squirrel@sm.tbruce.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pdxpug |
On Tue, May 8, 2012 10:08, Brent Dombrowski wrote:
> I need to update some check constraints for a postgis migration. I can
> find the constraints I'm interested in the the pg_constraint catalog.
> However, I'm having a hell of a time trying to get the table name
> associated with the constraint. I can get the schema name and the column
> is included in the source, but the table is eluding me. Anyone have a clue
> they could send my way?
>
> Brent D.
>
>
> --
> Sent via pdxpug mailing list (pdxpug(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pdxpug
>
Look at the conrelid column in pg_constraint and compare it to the oid
column of pg_class to pull the relname field.
Tim
--
Timothy J. Bruce
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Brent Dombrowski | 2012-05-08 17:41:09 | Re: Finding the Table for Check Constraint |
| Previous Message | David E. Wheeler | 2012-05-08 17:21:43 | Re: Finding the Table for Check Constraint |