非互換
FUJITSU Enterprise Postgres 14では、GiSTのインデックス利用する場合、「ORDER BY」よりのソート順番を変更する場合があります。
[例]
=# CREATE TABLE POINT_TBL(f1 point); CREATE TABLE =# INSERT INTO POINT_TBL(f1) VALUES ('(0.0,0.0)'); INSERT 0 1 =# INSERT INTO POINT_TBL(f1) VALUES ('(1e-300,-1e-300)'); INSERT 0 1 =# CREATE INDEX gpointind ON point_tbl USING gist (f1); CREATE INDEX =# SET enable_seqscan = OFF; SET =# SET enable_indexscan = ON; SET =# SET enable_bitmapscan = OFF; SET =# SELECT * FROM point_tbl ORDER BY f1 <-> '0,1'; f1 ------------------ (0,0) (1e-300,-1e-300) (2 rows)
[例]
=# CREATE TABLE POINT_TBL(f1 point); CREATE TABLE =# INSERT INTO POINT_TBL(f1) VALUES ('(0.0,0.0)'); INSERT 0 1 =# INSERT INTO POINT_TBL(f1) VALUES ('(1e-300,-1e-300)'); INSERT 0 1 =# CREATE INDEX gpointind ON point_tbl USING gist (f1); CREATE INDEX =# SET enable_seqscan = OFF; SET =# SET enable_indexscan = ON; SET =# SET enable_bitmapscan = OFF; SET =# SELECT * FROM point_tbl ORDER BY f1 <-> '0,1'; f1 ------------------ (1e-300,-1e-300) (0,0) (2 rows)
対処方法
ありません。