Re: pg_get_constraintdef failing with cache lookup error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_get_constraintdef failing with cache lookup error
Date: 2015-04-27 15:16:18
Message-ID: 1189.1430147778@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> pg_get_constraintdef() fails rather easily:
> =# select pg_get_constraintdef(1);
> ERROR: cache lookup failed for constraint 1

It's expected that the caller will supply a valid pg_constraint OID.
I don't think it's necessary to go out of our way to throw a friendlier
error message if the OID isn't found.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-04-27 15:24:41 Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
Previous Message Andres Freund 2015-04-27 15:12:29 Re: BUG #13143: Cannot stop and restart a streaming server with a replication slot