1-- uuid check 2CREATE TABLE uuidtmp (a uuid); 3\copy uuidtmp from 'data/uuid.data' 4SET enable_seqscan=on; 5SELECT count(*) FROM uuidtmp WHERE a < '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; 6 count 7------- 8 227 9(1 row) 10 11SELECT count(*) FROM uuidtmp WHERE a <= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; 12 count 13------- 14 228 15(1 row) 16 17SELECT count(*) FROM uuidtmp WHERE a = '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; 18 count 19------- 20 1 21(1 row) 22 23SELECT count(*) FROM uuidtmp WHERE a >= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; 24 count 25------- 26 376 27(1 row) 28 29SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203'; 30 count 31------- 32 375 33(1 row) 34 35CREATE INDEX uuididx ON uuidtmp USING gist ( a ); 36SET enable_seqscan=off; 37SELECT count(*) FROM uuidtmp WHERE a < '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; 38 count 39------- 40 227 41(1 row) 42 43SELECT count(*) FROM uuidtmp WHERE a <= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; 44 count 45------- 46 228 47(1 row) 48 49SELECT count(*) FROM uuidtmp WHERE a = '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; 50 count 51------- 52 1 53(1 row) 54 55SELECT count(*) FROM uuidtmp WHERE a >= '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; 56 count 57------- 58 376 59(1 row) 60 61SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid; 62 count 63------- 64 375 65(1 row) 66 67