Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ymklq-0003ic-La for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2015 15:16:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ymklq-00037e-5N for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2015 15:16:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ymklo-00037B-Tc for pgsql-bugs@postgresql.org; Mon, 27 Apr 2015 15:16:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Ymklm-00045w-1O for pgsql-bugs@postgresql.org; Mon, 27 Apr 2015 15:16:27 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t3RFGH7D003122; Mon, 27 Apr 2015 11:16:18 -0400 From: Tom Lane To: Michael Paquier cc: pgsql-bugs@postgresql.org Subject: Re: pg_get_constraintdef failing with cache lookup error In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Mon, 27 Apr 2015 16:24:38 +0900" Date: Mon, 27 Apr 2015 08:16:18 -0700 Message-ID: <1189.1430147778@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs