From 46651ce6fe013220ed397add242004d764fc0153 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:15:05 +0200 Subject: Adding upstream version 14.5. Signed-off-by: Daniel Baumann --- contrib/btree_gist/sql/varchar.sql | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 contrib/btree_gist/sql/varchar.sql (limited to 'contrib/btree_gist/sql/varchar.sql') diff --git a/contrib/btree_gist/sql/varchar.sql b/contrib/btree_gist/sql/varchar.sql new file mode 100644 index 0000000..8087a17 --- /dev/null +++ b/contrib/btree_gist/sql/varchar.sql @@ -0,0 +1,31 @@ +-- char check + +CREATE TABLE vchartmp (a varchar(32)); + +\copy vchartmp from 'data/char.data' + +SET enable_seqscan=on; + +SELECT count(*) FROM vchartmp WHERE a < '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a <= '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a = '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a >= '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a > '31b0'::varchar(32); + +CREATE INDEX vcharidx ON vchartmp USING GIST ( text(a) ); + +SET enable_seqscan=off; + +SELECT count(*) FROM vchartmp WHERE a < '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a <= '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a = '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a >= '31b0'::varchar(32); + +SELECT count(*) FROM vchartmp WHERE a > '31b0'::varchar(32); -- cgit v1.2.3