Skip to content

Fix compatibility with PG16 #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ env:
- PG_SUPPORTED_VERSIONS=13
- PG_SUPPORTED_VERSIONS=14
- PG_SUPPORTED_VERSIONS=15
- PG_SUPPORTED_VERSIONS=16

language: C
dist: bionic
dist: focal

before_install:
# extra apt.pg.o.sh options added in version 204, travis currently has 199 (2019-11-27)
Expand Down
11 changes: 11 additions & 0 deletions expected/moc100.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
\set ECHO none
outputfile_for_majorversion
-----------------------------
10, 11, 12
(1 row)

outputfile_for_arch_bits
--------------------------
64-bit
(1 row)

CREATE TABLE moc100 (
ivoid text,
coverage smoc,
Expand Down
11 changes: 11 additions & 0 deletions expected/moc100_1.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
\set ECHO none
outputfile_for_majorversion
-----------------------------
10, 11, 12
(1 row)

outputfile_for_arch_bits
--------------------------
32-bit
(1 row)

CREATE TABLE moc100 (
ivoid text,
coverage smoc,
Expand Down
11 changes: 11 additions & 0 deletions expected/moc100_2.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
\set ECHO none
outputfile_for_majorversion
-----------------------------
13, 14, 15
(1 row)

outputfile_for_arch_bits
--------------------------
64-bit
(1 row)

CREATE TABLE moc100 (
ivoid text,
coverage smoc,
Expand Down
11 changes: 11 additions & 0 deletions expected/moc100_3.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
\set ECHO none
outputfile_for_majorversion
-----------------------------
13, 14, 15
(1 row)

outputfile_for_arch_bits
--------------------------
32-bit
(1 row)

CREATE TABLE moc100 (
ivoid text,
coverage smoc,
Expand Down
309 changes: 309 additions & 0 deletions expected/moc100_4.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
\set ECHO none
outputfile_for_majorversion
-----------------------------
16+
(1 row)

outputfile_for_arch_bits
--------------------------
64-bit
(1 row)

CREATE TABLE moc100 (
ivoid text,
coverage smoc,
ref_system_name text
);
COPY moc100 FROM STDIN;
CREATE INDEX ON moc100 USING GIN (coverage);
SELECT ivoid FROM moc100 WHERE coverage && '4/0' ORDER BY ivoid;
ivoid
------------------------------------------
ivo://byu.arvo/dfbsspec/q/getssa
ivo://cadc.nrc.ca/archive/cfht
ivo://cadc.nrc.ca/archive/hst
ivo://cds.vizier/b/assocdata
ivo://cds.vizier/b/swift
ivo://cds.vizier/i/241
ivo://cds.vizier/iv/12
ivo://cds.vizier/ix/13
ivo://cds.vizier/j/a+a/316/147
ivo://cds.vizier/j/a+as/105/311
ivo://cds.vizier/j/a+as/122/235
ivo://chivo/gaia/q/dr1
ivo://chivo/openngc/q/data
ivo://cxc.harvard.edu/csc
ivo://irsa.ipac/2mass/catalog/psc
ivo://irsa.ipac/2mass/catalog/xsc
ivo://irsa.ipac/2mass/images/asky-ql
ivo://irsa.ipac/cosmos/images
ivo://irsa.ipac/iras/images/issa
ivo://irsa.ipac/mast/scrapbook
ivo://irsa.ipac/spitzer/images/swire
ivo://mssl.ucl.ac.uk/xmmsuss_dsa/xmmsuss
ivo://ned.ipac/sia
ivo://ned.ipac/tap
ivo://svo.cab/cat/gbs
ivo://svo.cab/cat/uves
ivo://svo.cab/cat/xshooter
ivo://vopdc.iap/fss
ivo://vopdc.obspm/imcce/m4ast
ivo://vopdc.obspm/imcce/miriade
ivo://vopdc.obspm/imcce/skybot
ivo://vopdc.obspm/lesia/bestars/besc
ivo://vopdc.obspm/lesia/bestars/bess
ivo://vopdc.obspm/luth/exoplanet
ivo://vopdc.obspm/luth/hess
(35 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage && '0/';
QUERY PLAN
----------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=0.00..4.01 rows=1 width=96) (actual rows=0 loops=1)
Recheck Cond: (coverage && '0/'::smoc)
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..0.00 rows=1 width=0) (actual rows=0 loops=1)
Index Cond: (coverage && '0/'::smoc)
Planning:
Buffers: shared hit=5
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage && '4/0';
QUERY PLAN
--------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=35 loops=1)
Filter: (coverage && '4/0'::smoc)
Rows Removed by Filter: 66
Buffers: shared hit=114
Planning:
Buffers: shared hit=1
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage = '0/0-11';
QUERY PLAN
--------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=23 loops=1)
Filter: (coverage = '0/0-11'::smoc)
Rows Removed by Filter: 78
Buffers: shared hit=59
Planning:
Buffers: shared hit=4
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage = '6/43225,43227';
QUERY PLAN
-------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=1 loops=1)
Filter: (coverage = '6/43225 43227'::smoc)
Rows Removed by Filter: 100
Buffers: shared hit=59
Planning:
Buffers: shared hit=1
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage = '0/';
QUERY PLAN
-------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=1 loops=1)
Filter: (coverage = '0/'::smoc)
Rows Removed by Filter: 100
Buffers: shared hit=59
Planning:
Buffers: shared hit=1
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <> '0/0-11';
QUERY PLAN
----------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=78 loops=1)
Filter: (coverage <> '0/0-11'::smoc)
Rows Removed by Filter: 23
Buffers: shared hit=59
Planning:
Buffers: shared hit=4
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <> '6/43225,43227';
QUERY PLAN
-----------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=100 loops=1)
Filter: (coverage <> '6/43225 43227'::smoc)
Rows Removed by Filter: 1
Buffers: shared hit=59
Planning:
Buffers: shared hit=1
(6 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <> '0/';
QUERY PLAN
-----------------------------------------------------------------------------------
Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=100 loops=1)
Filter: (coverage <> '0/'::smoc)
Rows Removed by Filter: 1
Buffers: shared hit=59
Planning:
Buffers: shared hit=1
(6 rows)

SET enable_seqscan = off;
EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage && '4/0';
QUERY PLAN
------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=38.92..42.93 rows=1 width=96) (actual rows=35 loops=1)
Recheck Cond: (coverage && '4/0'::smoc)
Heap Blocks: exact=5
Buffers: shared hit=85
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..38.92 rows=1 width=0) (actual rows=35 loops=1)
Index Cond: (coverage && '4/0'::smoc)
Buffers: shared hit=9
Planning:
Buffers: shared hit=1
(9 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <@ '4/0';
QUERY PLAN
------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=47.61..51.63 rows=1 width=96) (actual rows=1 loops=1)
Recheck Cond: (coverage <@ '4/0'::smoc)
Rows Removed by Index Recheck: 35
Heap Blocks: exact=5
Buffers: shared hit=33
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..47.61 rows=1 width=0) (actual rows=36 loops=1)
Index Cond: (coverage <@ '4/0'::smoc)
Buffers: shared hit=12
Planning:
Buffers: shared hit=4
(10 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage @> '4/0';
QUERY PLAN
------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=38.92..42.93 rows=1 width=96) (actual rows=28 loops=1)
Recheck Cond: (coverage @> '4/0'::smoc)
Rows Removed by Index Recheck: 1
Heap Blocks: exact=4
Buffers: shared hit=36
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..38.92 rows=1 width=0) (actual rows=29 loops=1)
Index Cond: (coverage @> '4/0'::smoc)
Buffers: shared hit=9
Planning:
Buffers: shared hit=4
(10 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage = '0/0-11';
QUERY PLAN
----------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=106879.01..106883.02 rows=1 width=96) (actual rows=23 loops=1)
Recheck Cond: (coverage = '0/0-11'::smoc)
Rows Removed by Index Recheck: 1
Heap Blocks: exact=2
Buffers: shared hit=24581
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..106879.01 rows=1 width=0) (actual rows=24 loops=1)
Index Cond: (coverage = '0/0-11'::smoc)
Buffers: shared hit=24577
Planning:
Buffers: shared hit=1
JIT:
Functions: 2
Options: Inlining false, Optimization false, Expressions true, Deforming true
(13 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage = '6/43225,43227';
QUERY PLAN
------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=12.83..16.84 rows=1 width=96) (actual rows=1 loops=1)
Recheck Cond: (coverage = '6/43225 43227'::smoc)
Rows Removed by Index Recheck: 28
Heap Blocks: exact=3
Buffers: shared hit=12
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..12.83 rows=1 width=0) (actual rows=29 loops=1)
Index Cond: (coverage = '6/43225 43227'::smoc)
Buffers: shared hit=3
Planning:
Buffers: shared hit=1
(10 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage = '0/';
QUERY PLAN
-----------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=12.83..16.84 rows=1 width=96) (actual rows=1 loops=1)
Recheck Cond: (coverage = '0/'::smoc)
Heap Blocks: exact=1
Buffers: shared hit=5
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..12.83 rows=1 width=0) (actual rows=1 loops=1)
Index Cond: (coverage = '0/'::smoc)
Buffers: shared hit=4
Planning:
Buffers: shared hit=1
(9 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <> '0/0-11';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=106888.23..106894.48 rows=100 width=96) (actual rows=78 loops=1)
Recheck Cond: (coverage <> '0/0-11'::smoc)
Rows Removed by Index Recheck: 23
Heap Blocks: exact=5
Buffers: shared hit=24821
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..106888.20 rows=100 width=0) (actual rows=101 loops=1)
Index Cond: (coverage <> '0/0-11'::smoc)
Buffers: shared hit=24762
Planning:
Buffers: shared hit=1
JIT:
Functions: 2
Options: Inlining false, Optimization false, Expressions true, Deforming true
(13 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <> '6/43225,43227';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=106888.23..106894.48 rows=100 width=96) (actual rows=100 loops=1)
Recheck Cond: (coverage <> '6/43225 43227'::smoc)
Rows Removed by Index Recheck: 1
Heap Blocks: exact=5
Buffers: shared hit=247
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..106888.20 rows=100 width=0) (actual rows=101 loops=1)
Index Cond: (coverage <> '6/43225 43227'::smoc)
Buffers: shared hit=188
Planning:
Buffers: shared hit=1
JIT:
Functions: 2
Options: Inlining false, Optimization false, Expressions true, Deforming true
(13 rows)

EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF)
SELECT * FROM moc100 WHERE coverage <> '0/';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on moc100 (cost=106888.23..106894.48 rows=100 width=96) (actual rows=100 loops=1)
Recheck Cond: (coverage <> '0/'::smoc)
Rows Removed by Index Recheck: 1
Heap Blocks: exact=5
Buffers: shared hit=245
-> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..106888.20 rows=100 width=0) (actual rows=101 loops=1)
Index Cond: (coverage <> '0/'::smoc)
Buffers: shared hit=186
Planning:
Buffers: shared hit=1
JIT:
Functions: 2
Options: Inlining false, Optimization false, Expressions true, Deforming true
(13 rows)

Loading