You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the generated SQL, the EXCLUDED keyword is escaped according to goqu.I rules, however the resulting SQL is not valid for postgres.
INSERT INTO "items" ("address") VALUES ('111 Address') ON CONFLICT (address) DO UPDATE SET "address"="EXCLUDED"."address";
ERROR: missing FROM-clause entry for table "EXCLUDED"
LINE 1: ...s') ON CONFLICT (address) DO UPDATE SET "address"="EXCLUDED"...
To Reproduce
Try to execute the generated code in Postgres.
Expected behavior
Statement must be successfully executed.
Dialect:
postgres
The text was updated successfully, but these errors were encountered:
Insert or update new distributors as appropriate. Assumes a unique index has been defined that constrains values appearing in the did column. Note that the special excluded table is used to reference values originally proposed for insertion:
INSERT INTO distributors (did, dname)
VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc')
ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname;
Describe the bug
goqu/expressions_example_test.go
Line 521 in ce5475c
In the generated SQL, the EXCLUDED keyword is escaped according to goqu.I rules, however the resulting SQL is not valid for postgres.
To Reproduce
Try to execute the generated code in Postgres.
Expected behavior
Statement must be successfully executed.
Dialect:
The text was updated successfully, but these errors were encountered: