get_constraint_index() and conindid - Mailing list pgsql-hackers

From Peter Eisentraut
Subject get_constraint_index() and conindid
Date
Msg-id 4688d55c-9a2e-9a5a-d166-5f24fe0bf8db@enterprisedb.com
Whole thread Raw
Responses Re: get_constraint_index() and conindid
List pgsql-hackers
get_constraint_index() does its work by going through pg_depend.  It was 
added before pg_constraint.conindid was added, and some callers are 
still not changed.  Are there reasons for that?  Probably not.  The 
attached patch changes get_constraint_index() to an lsyscache-style 
lookup instead.

The nearby get_index_constraint() should probably also be changed to 
scan pg_constraint instead of pg_depend, but that doesn't have a 
syscache to use, so it would be a different approach, so I figured I'd 
ask about get_constraint_index() first.



Attachment

pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Yet another fast GiST build
Next
From: Amit Kapila
Date:
Subject: Re: RFC: Deadlock detector hooks for victim selection and edge injection