postgres_scanner icon indicating copy to clipboard operation
postgres_scanner copied to clipboard

INSERT ... RETURNING clause returns error when inserting into Postgres table

Open tjdammann opened this issue 1 year ago • 1 comments

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?

  • [X] Yes, I have

tjdammann avatar Jan 25 '24 06:01 tjdammann

Hello @tjdammann, thanks for opening this issue. I transferred it to the postgres_scanner repository. In general, the main documentation does not discuss limitations of extensions, so if we document this, we'll do so under the extension page.

szarnyasg avatar Jan 25 '24 08:01 szarnyasg