Skip to content

Commit 93a062d

Browse files
committed
Fix for copy from database
1 parent cbac54f commit 93a062d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/MainDistributionPipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Build extension binaries
1717
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
1818
with:
19-
duckdb_version: v1.2.1
19+
duckdb_version: main
2020
ci_tools_version: main
2121
extension_name: postgres_scanner
2222
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw'
@@ -27,7 +27,7 @@ jobs:
2727
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main
2828
secrets: inherit
2929
with:
30-
duckdb_version: v1.2.1
30+
duckdb_version: main
3131
ci_tools_version: main
3232
extension_name: postgres_scanner
3333
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw'

src/storage/postgres_index.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "duckdb/planner/operator/logical_extension_operator.hpp"
55
#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
66
#include "duckdb/parser/parsed_data/drop_info.hpp"
7+
#include "duckdb/planner/operator/logical_create_index.hpp"
78

89
namespace duckdb {
910

@@ -72,8 +73,11 @@ class LogicalPostgresCreateIndex : public LogicalExtensionOperator {
7273
unique_ptr<LogicalOperator> PostgresCatalog::BindCreateIndex(Binder &binder, CreateStatement &stmt,
7374
TableCatalogEntry &table,
7475
unique_ptr<LogicalOperator> plan) {
75-
return make_uniq<LogicalPostgresCreateIndex>(unique_ptr_cast<CreateInfo, CreateIndexInfo>(std::move(stmt.info)),
76-
table);
76+
// FIXME: this is a work-around for the CreateIndexInfo we are getting here not being fully bound
77+
// this needs to be fixed upstream (eventually)
78+
auto result = Catalog::BindCreateIndex(binder, stmt, table, std::move(plan));
79+
auto &index_create = result->Cast<LogicalCreateIndex>();
80+
return make_uniq<LogicalPostgresCreateIndex>(std::move(index_create.info), table);
7781
}
7882

7983
} // namespace duckdb

test/sql/scanner/arrays.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ SELECT UNNEST(float_col), ROUND(UNNEST(double_col), 1) FROM pg_numarraytypes
3333
query IIIIIIII
3434
select * from pg_bytearraytypes;
3535
----
36-
[a, Z, NULL] [a, Z, NULL] [aaaa, ZZZZ, NULL] [aaaa, ZZZZ, NULL] [aaaa, ZZZZ, NULL] [x00, xff, NULL] [{"a":42}, NULL] [a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11, NULL]
36+
[a, Z, NULL] [a, Z, NULL] [aaaa, ZZZZ, NULL] [aaaa, ZZZZ, NULL] [aaaa, ZZZZ, NULL] [x00, xff, NULL] ['{"a":42}', NULL] [a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11, NULL]
3737
NULL NULL NULL NULL NULL NULL NULL NULL
3838

3939
query IIIII
4040
select * from pg_datearraytypes;
4141
----
42-
[2019-11-26, 2021-03-01, NULL] [14:42:43, 12:45:01, NULL] [14:42:43+05:45, 12:45:01+05:45, NULL] [2019-11-26 12:45:01, 2021-03-01 12:45:01, NULL] [2019-11-26 07:00:01+00, 2021-03-01 07:00:01+00, NULL]
42+
[2019-11-26, 2021-03-01, NULL] ['14:42:43', '12:45:01', NULL] ['14:42:43+05:45', '12:45:01+05:45', NULL] ['2019-11-26 12:45:01', '2021-03-01 12:45:01', NULL] ['2019-11-26 07:00:01+00', '2021-03-01 07:00:01+00', NULL]
4343
NULL NULL NULL NULL NULL
4444

4545
statement ok

0 commit comments

Comments
 (0)