File: copy_binary.out

package info (click to toggle)
postgresql-hll 2.18-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 58,720 kB
  • sloc: ansic: 2,805; sql: 2,160; cpp: 201; makefile: 22; sh: 1
file content (31 lines) | stat: -rw-r--r-- 799 bytes parent folder | download | duplicates (4)
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
SELECT hll_set_output_version(1);
 hll_set_output_version 
------------------------
                      1
(1 row)

DROP TABLE IF EXISTS test_binary;
NOTICE:  table "test_binary" does not exist, skipping
CREATE TABLE test_binary (id SERIAL, v1 hll);
INSERT INTO test_binary(id,v1) VALUES (1, hll_empty() || hll_hash_text('A'));
SELECT hll_cardinality(v1) FROM test_binary;
 hll_cardinality 
-----------------
               1
(1 row)

\COPY test_binary TO 'binary.dat' WITH (FORMAT "binary")
DELETE FROM test_binary;
SELECT hll_cardinality(v1) FROM test_binary;
 hll_cardinality 
-----------------
(0 rows)

\COPY test_binary FROM 'binary.dat' WITH (FORMAT "binary")
SELECT hll_cardinality(v1) FROM test_binary;
 hll_cardinality 
-----------------
               1
(1 row)

DROP TABLE test_binary;