- Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathbytea.sql
17 lines (13 loc) · 586 Bytes
/
bytea.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
set enable_seqscan=off;
-- ensure consistent test output regardless of the default bytea format
SET bytea_output TO escape;
CREATETABLEtest_bytea (
i bytea
);
INSERT INTO test_bytea VALUES ('a'),('ab'),('abc'),('abb'),('axy'),('xyz');
CREATEINDEXidx_byteaON test_bytea USING rum (i);
SELECT*FROM test_bytea WHERE i<'abc'::byteaORDER BY i;
SELECT*FROM test_bytea WHERE i<='abc'::byteaORDER BY i;
SELECT*FROM test_bytea WHERE i='abc'::byteaORDER BY i;
SELECT*FROM test_bytea WHERE i>='abc'::byteaORDER BY i;
SELECT*FROM test_bytea WHERE i>'abc'::byteaORDER BY i;