File: bit.out

package info (click to toggle)
postgresql-9.1 9.1.15-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 109,092 kB
  • sloc: ansic: 575,877; sql: 43,887; yacc: 26,399; perl: 6,352; lex: 6,171; sh: 5,282; makefile: 3,772; asm: 65; sed: 15; python: 12
file content (66 lines) | stat: -rw-r--r-- 1,265 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-- bit check
CREATE TABLE bittmp (a bit(33));
\copy bittmp from 'data/bit.data'
SET enable_seqscan=on;
SELECT count(*) FROM bittmp WHERE a <   '011011000100010111011000110000100';
 count 
-------
   249
(1 row)

SELECT count(*) FROM bittmp WHERE a <=  '011011000100010111011000110000100';
 count 
-------
   250
(1 row)

SELECT count(*) FROM bittmp WHERE a  =  '011011000100010111011000110000100';
 count 
-------
     1
(1 row)

SELECT count(*) FROM bittmp WHERE a >=  '011011000100010111011000110000100';
 count 
-------
   351
(1 row)

SELECT count(*) FROM bittmp WHERE a >   '011011000100010111011000110000100';
 count 
-------
   350
(1 row)

CREATE INDEX bitidx ON bittmp USING GIST ( a );
SET enable_seqscan=off;
SELECT count(*) FROM bittmp WHERE a <   '011011000100010111011000110000100';
 count 
-------
   249
(1 row)

SELECT count(*) FROM bittmp WHERE a <=  '011011000100010111011000110000100';
 count 
-------
   250
(1 row)

SELECT count(*) FROM bittmp WHERE a  =  '011011000100010111011000110000100';
 count 
-------
     1
(1 row)

SELECT count(*) FROM bittmp WHERE a >=  '011011000100010111011000110000100';
 count 
-------
   351
(1 row)

SELECT count(*) FROM bittmp WHERE a >   '011011000100010111011000110000100';
 count 
-------
   350
(1 row)