Re: GetSubscriptionRelations declares too many scan keys - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GetSubscriptionRelations declares too many scan keys
Date
Msg-id 622002.1620656048@sss.pgh.pa.us
Whole thread Raw
In response to Re: GetSubscriptionRelations declares too many scan keys  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: GetSubscriptionRelations declares too many scan keys
List pgsql-hackers
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Mon, May 10, 2021 at 07:09:29PM +1000, Peter Smith wrote:
>> Please search PG source code for "ScanData skey[1];" - there are
>> dozens of precedents where other people felt the same as me for
>> declaring single keys.

> AFAICT there are 73 occurences vs 62 of the "Scandata skey;".  I don't think
> there's a huge consensus for one over the other.

Yeah, there's no real consensus about that.  But in this case there's
a strong reason to use skey[1]: it makes the patch a very safe one-liner.
To convert to the other pattern would require touching more code.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inaccurate error message when set fdw batch_size to 0
Next
From: Pavel Stehule
Date:
Subject: pg_stat_statements requires compute_query_id