Re: should check collations when creating partitioned index
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Peter Eisentraut <peter@eisentraut.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-11-17T20:18:57Z
Lists: pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes: > In the patch, you check for an exact collation match. Considering this > case only depends on equality, I think it would be correct if the > requirement was that (a) both collations are deterministic; or (b) the > collations match exactly. You keep harping on this idea that we are only concerned with equality, but I think you are wrong. We expect a btree index to provide ordering not only equality, and this example definitely is a btree index. Possibly, with a great deal more specificity added to the check, we could distinguish the cases where ordering can't matter and allow collation variance then. I do not see the value of that, especially not when measured against the risk of introducing subtle bugs. regards, tom lane
Commits
-
Check collation when creating partitioned index
- 5d40b3c4f6ca 12.18 landed
- 3c49fa2aff2c 13.14 landed
- e846fc491923 14.11 landed
- 15d485921b1c 15.6 landed
- 267f33f68417 16.2 landed
- a11c9c42ea31 17.0 landed