When I use postgres_scan an exception occurs: permission denied for table
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the postgres_scan query from the report against PostgreSQL using DuckDB 0.9.2 or the main build, including the table's column restrictions. Inspect the postgres_scan implementation and compare its COPY-based access with a direct PostgreSQL SELECT. Done means the reported query works with the stated permissions, or the limitation and required privileges are clearly documented.
Written by the indexing model from the issue text.
Description
What happens?
I am using Quickdb 0.9.2.
In my SQL script, I call the postgres_scan command.
I specify the correct data for the connection: host, port, user, and so on. (I checked on other tables).
When I want to make a typical request:
SELECT
user_id
FROM
postgres_scan('host=**** port=**** dbname=**** user=**** password=****', 'public', 'some_table')
LIMIT 10
I'm getting an error:
SQL Error: Invalid Error: Failed to prepare COPY "
COPY (SELECT "user_id" FROM "public"."some_table" WHERE id BETWEEN '(0,0)'::tid AND '(1000,0)'::tid) TO STDOUT (FORMAT binary);
": ERROR: permission denied for table some_table.
But the table allows you to get data from it while working with it through PostgreSQL itself.
Remark: In the table, there is a viewing limit for some columns. Perhaps the problem is related to this moment?
To Reproduce
- You need to install DuckDB 0.9.2
- Run the postgres_scan command on a regular SELECT
- Get an error
- If there is no error, then check the constraints on the table (columns) and run SELECT again
OS:
MacOS 14.2.1 (23C71)
DuckDB Version:
0.9.2
DuckDB Client:
DBeaver
Full Name:
Ivan Korsakov
Affiliation:
By yourself
Have you tried this on the latest main branch?
I have tested with a main build
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Yes, I have
- Dominant language
- C++
- Stars
- 375
- Forks
- 113
- Avg merge
- 5h 32m
- Merged PRs (30d)
- 36
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-postgres
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
duckdb/duckdb-postgres#638 ·
Maintainers usually reply within 1 day
-
v2.0: generate_subscripts(list, 1) fails with 'positional argument following named argument' after attaching PostgresPossibly taken @staticlibs claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
duckdb/duckdb-postgres#630 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
duckdb/duckdb-postgres#628 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
duckdb/duckdb-postgres#623 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
duckdb/duckdb-postgres#618 ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-postgres
Similar issues
-
crash lld:COFF
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
llvm/llvm-project#235970 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: iOS textarea wraps text mid-word because LynxUIBaseInput hardcodes NSLineBreakByCharWrappingOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
lynx-family/lynx#10455 ·
Maintainers usually reply within 1 day
-
A-tools P-low S-blocked task
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
cv::checkRange fails with "Unsupported matrix depth" for fp8 depthsPossibly taken @sshivensolanki claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Rifle-variant weapon offsets are saved under the pistol's name [FRIK-093]Possibly taken @rollingrock claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rollingrock/Fallout-4-VR-Body#182 ·