postgresql/contrib/btree_gist/sql/varchar.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
840 B
MySQL
Raw Normal View History

2023-05-09 21:11:15 +00:00
-- 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);