Skip to content

Commit 0d70d1d

Browse files
authored
Merge pull request #348 from Mytherin/issue345
Fix #345: support READ_WRITE option correctly
2 parents f0fc700 + a774054 commit 0d70d1d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/postgres_storage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static unique_ptr<Catalog> PostgresAttach(StorageExtensionInfo *storage_info, Cl
2121
PostgresIsolationLevel isolation_level = PostgresIsolationLevel::REPEATABLE_READ;
2222
for (auto &entry : info.options) {
2323
auto lower_name = StringUtil::Lower(entry.first);
24-
if (lower_name == "type" || lower_name == "read_only") {
24+
if (lower_name == "type" || lower_name == "read_only" || lower_name == "read_write") {
2525
// already handled
2626
} else if (lower_name == "secret") {
2727
secret_name = entry.second.ToString();

test/sql/storage/attach_json.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ statement ok
1212
PRAGMA enable_verification
1313

1414
statement ok
15-
ATTACH 'dbname=postgresscanner' AS postgres_db (TYPE POSTGRES)
15+
ATTACH 'dbname=postgresscanner' AS postgres_db (TYPE POSTGRES, READ_WRITE)
1616

1717
statement ok
1818
CREATE OR REPLACE TABLE postgres_db.json_tbl AS SELECT '{"a": 42}'::JSON AS json_col

0 commit comments

Comments
 (0)