-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
What happens?
In following SQL:
INSERT INTO T (id) VALUES (1) RETURNING id AS inserted
SQLStatement
is extracted fromConnection
.- Call
SQLStatement::ToString
method.
A SQL discarded alias of returning clause is returned.
To Reproduce
std::string sql("INSERT INTO T (id) VALUES (1) RETURNING id AS inserted");
auto stmts = conn.ExtractStatements(sql);
std::out << stmts[0]->ToString() << std::end;
Expected result:
INSERT INTO T (id) (VALUES (1)) RETURNING id AS inserted
Actual result:
INSERT INTO T (id) (VALUES (1)) RETURNING id
EDIT:
UPDATE and DELETE statements is also discarded it but not discribing about returning
clause explicitly.
OS:
MacOS Ventura 13.6.7 (x86_64 16GB RAM)
DuckDB Version:
1.1.2
DuckDB Client:
C++
Hardware:
No response
Full Name:
Kazuhiko TAMURA
Affiliation:
No job
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have not tested with any build
Did you include all relevant data sets for reproducing the issue?
No - Other reason (please specify in the issue body)
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
- Yes, I have