pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: get_constraint_index() and conindid
Date: Tue, 08 Dec 2020 13:28:39 -0500
Message-ID: <3260997.1607452119@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEze2WjBDFL3tSUTkaijZOa-pg3k_VcmyQzMXtW-qWQNfj-SKw@mail.gmail.com>
References: <4688d55c-9a2e-9a5a-d166-5f24fe0bf8db@enterprisedb.com>
	<CAEze2WjBDFL3tSUTkaijZOa-pg3k_VcmyQzMXtW-qWQNfj-SKw@mail.gmail.com>

Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
> On Mon, 7 Dec 2020 at 11:09, Peter Eisentraut
> <peter.eisentraut@enterprisedb.com> wrote:
>> 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.

> This looks quite reasonable, and it passes "make installcheck-world".

+1, LGTM.

> Only thing I could think of is that it maybe could use a (small)
> comment in the message on that/why get_constraint_index is moved to
> utils/lsyscache from catalog/dependency, as that took me some time to
> understand.

commit message could reasonably say that maybe, but I don't think we
need to memorialize it in a comment.  lsyscache.c *is* where one
would expect to find a simple catalog-field-fetch function like this.
The previous implementation was not that, so it didn't belong there.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <3260997.1607452119@sss.pgh.pa.us>
Permalink:  ../3260997.1607452119@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3260997.1607452119@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, boekewurm+postgres@gmail.com, peter.eisentraut@enterprisedb.com
  Subject: Re: get_constraint_index() and conindid
  In-Reply-To: <3260997.1607452119@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox