summaryrefslogtreecommitdiffstats
path: root/contrib/btree_gin/sql/varchar.sql
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/btree_gin/sql/varchar.sql15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/btree_gin/sql/varchar.sql b/contrib/btree_gin/sql/varchar.sql
new file mode 100644
index 0000000..dbdacab
--- /dev/null
+++ b/contrib/btree_gin/sql/varchar.sql
@@ -0,0 +1,15 @@
+set enable_seqscan=off;
+
+CREATE TABLE test_varchar (
+ i varchar
+);
+
+INSERT INTO test_varchar VALUES ('a'),('ab'),('abc'),('abb'),('axy'),('xyz');
+
+CREATE INDEX idx_varchar ON test_varchar USING gin (i);
+
+SELECT * FROM test_varchar WHERE i<'abc'::varchar ORDER BY i;
+SELECT * FROM test_varchar WHERE i<='abc'::varchar ORDER BY i;
+SELECT * FROM test_varchar WHERE i='abc'::varchar ORDER BY i;
+SELECT * FROM test_varchar WHERE i>='abc'::varchar ORDER BY i;
+SELECT * FROM test_varchar WHERE i>'abc'::varchar ORDER BY i;