Re: pg_get_constraintdef failing with cache lookup error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_get_constraintdef failing with cache lookup error
Date
Msg-id 1189.1430147778@sss.pgh.pa.us
Whole thread Raw
In response to pg_get_constraintdef failing with cache lookup error  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: pg_get_constraintdef failing with cache lookup error  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
Michael Paquier <michael.paquier@gmail.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

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #13143: Cannot stop and restart a streaming server with a replication slot
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)