Skip to content

Commit 96ff7f7

Browse files
committed
gah
1 parent 3690f46 commit 96ff7f7

File tree

7 files changed

+135
-146
lines changed

7 files changed

+135
-146
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: Test
8888
shell: bash
8989
run: |
90-
./build/release/test/Release/unittest --test-dir . test/postgres_scanner/aws-rds.test
90+
./build/release/test/Debug/unittest --test-dir . test/postgres_scanner/aws-rds.test
9191
9292
- uses: actions/upload-artifact@v3
9393
with:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ debug:
2323
mkdir -p build/debug && \
2424
cd build/debug && \
2525
cmake -DCMAKE_BUILD_TYPE=Debug ${OSX_BUILD_UNIVERSAL_FLAG} -DBUILD_TPCH_EXTENSION=1 -DBUILD_TPCDS_EXTENSION=1 -DEXTENSION_STATIC_BUILD=1 ../../duckdb/CMakeLists.txt -DEXTERNAL_EXTENSION_DIRECTORIES=${POSTGRES_SCANNER_PATH} -B. -S ../../duckdb && \
26-
cmake --build . --parallel
26+
cmake --build .
2727

2828

2929
release: pull
3030
mkdir -p build/release && \
3131
cd build/release && \
3232
cmake -DCMAKE_BUILD_TYPE=Release ${OSX_BUILD_UNIVERSAL_FLAG} -DBUILD_TPCH_EXTENSION=1 -DBUILD_TPCDS_EXTENSION=1 -DEXTENSION_STATIC_BUILD=1 ../../duckdb/CMakeLists.txt -DEXTERNAL_EXTENSION_DIRECTORIES=${POSTGRES_SCANNER_PATH} -B. -S ../../duckdb && \
33-
cmake --build . --parallel
33+
cmake --build .
3434

3535

3636
test: release

create-postgres-tables.sh

Lines changed: 3 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -13,150 +13,11 @@ createdb postgresscanner
1313

1414
psql -d postgresscanner < /tmp/postgresscannertmp/schema.sql
1515
psql -d postgresscanner < /tmp/postgresscannertmp/load.sql
16-
psql -d postgresscanner < all_pg_types.sql
17-
psql -d postgresscanner < decimals.sql
18-
1916
rm -rf /tmp/postgresscannertmp
2017

21-
echo "
22-
create table nulltest (c1 integer, c2 integer, c3 integer, c4 integer, c5 integer, c6 integer, c7 integer, c8 integer, c9 integer, c10 integer);
23-
insert into nulltest values (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
24-
insert into nulltest values (1, NULL, 3, 4, NULL, 6, 7, 8, NULL, 10);
25-
insert into nulltest values (NULL, NULL, 3, 4, 5, 6, 7, NULL, NULL, NULL);
26-
insert into nulltest values (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
27-
" | psql -d postgresscanner
28-
29-
echo "
30-
create type color_t as enum('blue', 'red', 'gray', 'black');
31-
32-
create table cars
33-
(
34-
brand text,
35-
model text,
36-
color color_t
37-
);
38-
39-
insert into cars(brand, model, color)
40-
values ('ferari', 'testarosa', 'red'),
41-
('aston martin', 'db2', 'blue'),
42-
('bentley', 'mulsanne', 'gray'),
43-
('ford', 'T', 'black');
44-
45-
create table intervals as select '42 day'::INTERVAL interval_days UNION ALL SELECT '42 month'::INTERVAL UNION ALL SELECT '42 year'::INTERVAL UNION ALL SELECT '42 minute'::INTERVAL UNION ALL SELECT '42 second'::INTERVAL UNION ALL SELECT '0.42 second'::INTERVAL UNION ALL SELECT '-42 day'::INTERVAL interval_days UNION ALL SELECT NULL::INTERVAL;
46-
47-
" | psql -d postgresscanner
48-
49-
50-
51-
echo "
52-
CREATE TABLE
53-
duckdb_arr_test
54-
(
55-
id INTEGER NOT NULL,
56-
my_ints INTEGER[] NOT NULL,
57-
e INTEGER
58-
);
59-
60-
INSERT INTO
61-
duckdb_arr_test
62-
(
63-
id,
64-
my_ints,
65-
e
66-
)
67-
VALUES
68-
(
69-
123,
70-
ARRAY[11, 22, 33],
71-
42
72-
)
73-
;
74-
INSERT INTO
75-
duckdb_arr_test
76-
(
77-
id,
78-
my_ints,
79-
e
80-
)
81-
VALUES
82-
(
83-
234,
84-
ARRAY[]::INTEGER[],
85-
42
86-
)
87-
;
88-
INSERT INTO
89-
duckdb_arr_test
90-
(
91-
id,
92-
my_ints,
93-
e
94-
)
95-
VALUES
96-
(
97-
456,
98-
ARRAY[44, 55, 66],
99-
42
100-
)
101-
;
102-
" | psql -d postgresscanner
103-
104-
105-
echo "
106-
CREATE TABLE oids (i oid);
107-
INSERT INTO oids VALUES (42), (43);" | psql -d postgresscanner
108-
109-
echo "
110-
CREATE TABLE daterange (room int, during tsrange);
111-
INSERT INTO daterange VALUES
112-
(1108, '[2010-01-01 14:30, 2010-01-01 15:30)');
113-
" | psql -d postgresscanner
114-
115-
116-
echo "
117-
CREATE DOMAIN my_type_v30 AS VARCHAR(30) NOT NULL;
118-
119-
CREATE DOMAIN my_id AS INT4;
120-
121-
CREATE TABLE my_table (
122-
table_id my_id PRIMARY KEY,
123-
table_var varchar(10),
124-
table_v30 my_type_v30
125-
);
126-
insert into my_table values (42, 'something', 'something else');
127-
128-
" | psql -d postgresscanner
129-
130-
echo "
131-
CREATE SCHEMA some_schema;
132-
133-
create type some_schema.some_enum as enum('one', 'two');
134-
135-
CREATE TABLE some_schema.some_table (
136-
some_field some_schema.some_enum
137-
);
138-
insert into some_schema.some_table values ('two');
139-
140-
" | psql -d postgresscanner
141-
142-
echo "create table fail(n numeric(12,7));
143-
insert into fail values
144-
(42.8875000),
145-
(42.0000000),
146-
(42.1000000),
147-
(42.1200000),
148-
(42.1230000),
149-
(42.1234000),
150-
(42.1234500),
151-
(42.1234560),
152-
(42.1234567) ;" | psql -d postgresscanner
153-
154-
155-
echo "
156-
CREATE TABLE dum();
157-
CREATE TABLE dee();
158-
INSERT INTO dee DEFAULT VALUES;
159-
" | psql -d postgresscanner
18+
psql -d postgresscanner < test/all_pg_types.sql
19+
psql -d postgresscanner < test/decimals.sql
20+
psql -d postgresscanner < test/other.sql
16021

16122

16223
psql -d postgresscanner -c "CHECKPOINT"
File renamed without changes.
File renamed without changes.

test/other.sql

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
create table nulltest (c1 integer, c2 integer, c3 integer, c4 integer, c5 integer, c6 integer, c7 integer, c8 integer, c9 integer, c10 integer);
2+
insert into nulltest values (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
3+
insert into nulltest values (1, NULL, 3, 4, NULL, 6, 7, 8, NULL, 10);
4+
insert into nulltest values (NULL, NULL, 3, 4, 5, 6, 7, NULL, NULL, NULL);
5+
insert into nulltest values (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
6+
7+
8+
create type color_t as enum('blue', 'red', 'gray', 'black');
9+
10+
create table cars
11+
(
12+
brand text,
13+
model text,
14+
color color_t
15+
);
16+
17+
insert into cars(brand, model, color)
18+
values ('ferari', 'testarosa', 'red'),
19+
('aston martin', 'db2', 'blue'),
20+
('bentley', 'mulsanne', 'gray'),
21+
('ford', 'T', 'black');
22+
23+
create table intervals as select '42 day'::INTERVAL interval_days UNION ALL SELECT '42 month'::INTERVAL UNION ALL SELECT '42 year'::INTERVAL UNION ALL SELECT '42 minute'::INTERVAL UNION ALL SELECT '42 second'::INTERVAL UNION ALL SELECT '0.42 second'::INTERVAL UNION ALL SELECT '-42 day'::INTERVAL interval_days UNION ALL SELECT NULL::INTERVAL;
24+
25+
26+
27+
CREATE TABLE
28+
duckdb_arr_test
29+
(
30+
id INTEGER NOT NULL,
31+
my_ints INTEGER[] NOT NULL,
32+
e INTEGER
33+
);
34+
35+
INSERT INTO
36+
duckdb_arr_test
37+
(
38+
id,
39+
my_ints,
40+
e
41+
)
42+
VALUES
43+
(
44+
123,
45+
ARRAY[11, 22, 33],
46+
42
47+
)
48+
;
49+
INSERT INTO
50+
duckdb_arr_test
51+
(
52+
id,
53+
my_ints,
54+
e
55+
)
56+
VALUES
57+
(
58+
234,
59+
ARRAY[]::INTEGER[],
60+
42
61+
)
62+
;
63+
INSERT INTO
64+
duckdb_arr_test
65+
(
66+
id,
67+
my_ints,
68+
e
69+
)
70+
VALUES
71+
(
72+
456,
73+
ARRAY[44, 55, 66],
74+
42
75+
)
76+
;
77+
78+
79+
CREATE TABLE oids (i oid);
80+
INSERT INTO oids VALUES (42), (43);
81+
82+
83+
84+
CREATE TABLE daterange (room int, during tsrange);
85+
INSERT INTO daterange VALUES
86+
(1108, '[2010-01-01 14:30, 2010-01-01 15:30)');
87+
88+
89+
90+
91+
CREATE DOMAIN my_type_v30 AS VARCHAR(30) NOT NULL;
92+
93+
CREATE DOMAIN my_id AS INT4;
94+
95+
CREATE TABLE my_table (
96+
table_id my_id PRIMARY KEY,
97+
table_var varchar(10),
98+
table_v30 my_type_v30
99+
);
100+
insert into my_table values (42, 'something', 'something else');
101+
102+
103+
CREATE SCHEMA some_schema;
104+
105+
create type some_schema.some_enum as enum('one', 'two');
106+
107+
CREATE TABLE some_schema.some_table (
108+
some_field some_schema.some_enum
109+
);
110+
insert into some_schema.some_table values ('two');
111+
112+
113+
create table fail(n numeric(12,7));
114+
insert into fail values
115+
(42.8875000),
116+
(42.0000000),
117+
(42.1000000),
118+
(42.1200000),
119+
(42.1230000),
120+
(42.1234000),
121+
(42.1234500),
122+
(42.1234560),
123+
(42.1234567) ;
124+
125+
126+
CREATE TABLE dum();
127+
CREATE TABLE dee();
128+
INSERT INTO dee DEFAULT VALUES;

0 commit comments

Comments
 (0)