Typo with amtype = 's' in opr_sanity.sql

Started by Michael Paquierover 2 years ago3 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Hi all,

While rebasing a patch from 2016 related to sequence AMs (more about
that later), I've bumped on a mistake from 8586bf7ed888 in
opr_sanity.sql, as of:
+SELECT p1.oid, p1.amname, p2.oid, p2.proname
+FROM pg_am AS p1, pg_proc AS p2
+WHERE p2.oid = p1.amhandler AND p1.amtype = 's' AND

It seems to me that this has been copy-pasted on HEAD from the
sequence AM patch, but forgot to update amtype to 't'. While that's
maybe cosmetic, I think that this could lead to unexpected results, so
perhaps there is a point in doing a backpatch?

Thoughts?
--
Michael

Attachments:

opr-sanity-amtype.patchtext/x-diff; charset=us-asciiDownload+2-2
#2Aleksander Alekseev
aleksander@timescale.com
In reply to: Michael Paquier (#1)
Re: Typo with amtype = 's' in opr_sanity.sql

Hi,

While rebasing a patch from 2016 related to sequence AMs (more about
that later), I've bumped on a mistake from 8586bf7ed888 in
opr_sanity.sql, as of:
+SELECT p1.oid, p1.amname, p2.oid, p2.proname
+FROM pg_am AS p1, pg_proc AS p2
+WHERE p2.oid = p1.amhandler AND p1.amtype = 's' AND

Good catch.

It seems to me that this has been copy-pasted on HEAD from the
sequence AM patch, but forgot to update amtype to 't'. While that's
maybe cosmetic, I think that this could lead to unexpected results, so
perhaps there is a point in doing a backpatch?

I disagree that it's cosmetic. The test doesn't check what it's supposed to.

--
Best regards,
Aleksander Alekseev

#3Michael Paquier
michael@paquier.xyz
In reply to: Aleksander Alekseev (#2)
Re: Typo with amtype = 's' in opr_sanity.sql

On Tue, Nov 21, 2023 at 01:02:40PM +0300, Aleksander Alekseev wrote:

It seems to me that this has been copy-pasted on HEAD from the
sequence AM patch, but forgot to update amtype to 't'. While that's
maybe cosmetic, I think that this could lead to unexpected results, so
perhaps there is a point in doing a backpatch?

I disagree that it's cosmetic. The test doesn't check what it's supposed to.

Yes, I've backpatched that all the way down to 12 at the end.
--
Michael