Skip to content

Commit 664501b

Browse files
committed
Tests cleanup, collation fix restored
1 parent 3bb2382 commit 664501b

12 files changed

Lines changed: 26 additions & 56 deletions

.github/workflows/IntegrationTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
password: 'postgres'
106106
database: 'postgres'
107107
port: '5432'
108+
ssl: true
108109

109110
- name: Run tests
110111
env:

src/postgres_filter_pushdown.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ string PostgresFilterPushdown::TransformConstantFilter(const string &column_name
8181
constant_string = TransformLiteral(constant);
8282
}
8383
auto operator_string = TransformComparison(comparison_type);
84-
return StringUtil::Format("%s %s %s", column_name, operator_string, constant_string);
84+
string comparison = StringUtil::Format("%s %s %s", column_name, operator_string, constant_string);
85+
if (constant.type().id() == LogicalTypeId::VARCHAR) {
86+
comparison += " COLLATE \"C\"";
87+
}
88+
return comparison;
8589
}
8690

8791
string PostgresFilterPushdown::TransformExpressionSubject(const string &column_name, const Expression &expr) {

test/sql/scanner/aws-rds.test

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/sql/scanner/ssl.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ require postgres_scanner
66

77
require-env POSTGRES_TEST_DATABASE_AVAILABLE
88

9-
require-env POSTGRES_TEST_TEMPORARY_DISABLED
9+
statement ok
10+
ATTACH 'dbname=postgresscanner sslmode=require' AS s1 (TYPE POSTGRES)
1011

1112
statement ok
12-
CALL postgres_attach('dbname=postgresscanner sslmode=require');
13+
use s1
1314

1415
query III
1516
select * from cars;

test/sql/scanner/tpcds.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ require postgres_scanner
88

99
require-env POSTGRES_TEST_DATABASE_AVAILABLE
1010

11-
# TODO: currently fails with out of storage on CI?
1211
mode skip
1312

1413
statement ok

test/sql/storage/attach_connection_pool_configure.test

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ require postgres_scanner
66

77
require-env POSTGRES_TEST_DATABASE_AVAILABLE
88

9-
require-env POSTGRES_TEST_TEMPORARY_DISABLED
10-
119
statement ok
1210
ATTACH 'dbname=postgresscanner' AS loader (TYPE POSTGRES);
1311

@@ -26,13 +24,13 @@ ATTACH 'dbname=postgresscanner' AS s1 (TYPE POSTGRES);
2624
statement ok
2725
RESET GLOBAL pg_pool_max_connections
2826

29-
query IIIIIIIIIII
30-
SELECT catalog_name, max_connections, cache_hits, cache_misses, try_failures, thread_local_cache_enabled, max_lifetime_millis, idle_timeout_millis, reaper_thread_running, reaper_thread_period_millis, health_check_query
27+
query IIIIIIIIII
28+
SELECT catalog_name, max_connections, /*cache_hits,*/ cache_misses, try_failures, thread_local_cache_enabled, max_lifetime_millis, idle_timeout_millis, reaper_thread_running, reaper_thread_period_millis, health_check_query
3129
FROM postgres_configure_pool()
3230
ORDER BY catalog_name
3331
----
34-
s 8 2 1 0 FALSE 0 60000 1 30000 SELECT 1
35-
s1 8 1 1 0 FALSE 0 60000 1 30000 SELECT 1
32+
s 8 1 0 FALSE 0 60000 1 30000 SELECT 1
33+
s1 8 1 0 FALSE 0 60000 1 30000 SELECT 1
3634

3735
query II
3836
SELECT catalog_name, acquire_mode

test/sql/storage/attach_delete.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ DELETE FROM s1.test RETURNING *;
6969
----
7070
not yet supported
7171

72-
# mixing duckdb tables in deletes is not supported
73-
mode skip
74-
7572
statement ok
7673
INSERT INTO s1.test VALUES (1), (2), (3), (NULL);
7774

test/sql/storage/attach_like.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ require postgres_scanner
66

77
require-env POSTGRES_TEST_DATABASE_AVAILABLE
88

9-
require-env POSTGRES_TEST_TEMPORARY_DISABLED
10-
119
statement ok
1210
ATTACH 'dbname=postgresscanner' AS s1 (TYPE POSTGRES)
1311

test/sql/storage/attach_secret.test

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ require postgres_scanner
66

77
require-env POSTGRES_TEST_DATABASE_AVAILABLE
88

9-
require-env POSTGRES_TEST_TEMPORARY_DISABLED
10-
119
# attach using default secret
1210
statement ok
1311
CREATE SECRET (
@@ -113,7 +111,7 @@ DROP SECRET postgres_db;
113111
statement ok
114112
CREATE OR REPLACE SECRET postgres_db (
115113
TYPE POSTGRES,
116-
URI 'postgresql://postgres:postgres@localhost:5432/postgresscanner'
114+
URI 'postgresql://postgres:postgres@localhost:5432/postgresscanner?sslmode=allow'
117115
);
118116

119117
statement ok

test/sql/storage/attach_temporary_table.test

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
# description: Test attaching and querying a Postgres temporary table
33
# group: [storage]
44

5-
mode skip
6-
75
require postgres_scanner
86

97
require-env POSTGRES_TEST_DATABASE_AVAILABLE
108

119
statement ok
1210
ATTACH 'postgres:dbname=postgresscanner' AS s
1311

12+
statement ok
13+
BEGIN TRANSACTION
14+
1415
statement ok
1516
CREATE TABLE s.pg_temp.my_datasets(val VARCHAR)
1617

@@ -25,3 +26,11 @@ query I
2526
SELECT * FROM s.pg_temp.my_datasets
2627
----
2728
hello world
29+
30+
statement ok
31+
ROLLBACK
32+
33+
statement error
34+
SELECT * FROM s.pg_temp.my_datasets
35+
----
36+
does not exist

0 commit comments

Comments
 (0)