INSERT ... RETURNING clause returns error when inserting into Postgres table
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the INSERT ... RETURNING example from the issue through the Python client against a Postgres table, using the reported 0.9.2 behavior and a current main build. Read the linked INSERT RETURNING documentation and trace the Postgres-table insertion path to determine whether the clause should work or be documented as unsupported. Done means the intended behavior is established and either the generated id is returned or the documentation clearly matches the limitation.
Written by the indexing model from the issue text.
Description
What happens?
When attempting to insert into a Postgres table and return the auto-generated ID for use in indexing, the following error is thrown:
Binder Error: RETURNING clause not yet supported for insertion into Postgres table
This isn't mentioned in the docs here as being unsupported, so would be great to know if it's intended or a bug!
To Reproduce
Insert into any postgres table, e.g. for a users table with just an id and name:
INSERT INTO users (name)
VALUES (`test_name`)
RETURNING id;
OS:
MacOS Sonoma 14.1
DuckDB Version:
0.9.2
DuckDB Client:
Python
Full Name:
Tyler Dammann
Affiliation:
Bruinen
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
- 372
- Forks
- 107
- Avg merge
- 13h 55m
- Merged PRs (30d)
- 13
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 48/100
duckdb/duckdb-postgres#575 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
duckdb/duckdb-postgres#564 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
duckdb/duckdb-postgres#491 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#487 · 1 comment ·
Maintainers usually reply within 1 day
-
After `COPY DATABASE FROM <pg>`, the types from pg are improperly formatted in `EXPORT` commandsOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#429 ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-postgres
Similar issues
-
Component: Python API
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Vector35/binaryninja-api#8649 ·
Maintainers usually reply within 3 days
-
ai_p2 comp-parquet-reader-v3
Difficulty 2/5 Half a day Newbie friendliness 66/100
ClickHouse/ClickHouse#124986 ·
Maintainers usually reply within 1 day
-
bug product: very_good_flutter_plugin
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
VeryGoodOpenSource/very_good_templates#654 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AcademySoftwareFoundation/OpenImageIO#5550 ·
Maintainers usually reply within 2 days