alitrack / duckdb_fdw

DuckDB Foreign Data Wrapper for PostgreSQL
MIT License
347 stars 21 forks source link

failed to open sqlite db error #41

Open icefairy opened 8 months ago

icefairy commented 8 months ago

pg15 duckdb 0.10.1

create server ds foreign data wrapper duckdb_fdw options (database '/home/postgres/duckdb');

select duckdb_execute('ds','create table t1(a integer ,b integer ,c varchar(10));'); ERROR: failed to open SQLite DB. rc=1 path=/home/postgres/duckdb

select duckdb_execute('ds','create or replace view myv select now();'); ERROR: failed to open SQLite DB. rc=1 path=/home/postgres/duckdb

the fdw just worked with precreated database with duckdb cli,I want to know if it can work without duckdb cli,just use duckdb with fdw and duckdb_execute to create table and using it? thanks

icefairy commented 8 months ago

the directory of /home/postgres/duckdb is owner by postgres,the permssions are setting ok (because it works with created database using duckdb cli)

alitrack commented 8 months ago

/home/postgres/duckdb is a directory or duckdb database path?

if db, make sure postgres use has the owner of it.