Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tableName.columnName is ambiguous with schema #442

Closed
jtwebb opened this issue Feb 24, 2025 · 1 comment
Closed

tableName.columnName is ambiguous with schema #442

jtwebb opened this issue Feb 24, 2025 · 1 comment

Comments

@jtwebb
Copy link

jtwebb commented Feb 24, 2025

Describe the bug

When using a schema, the following insert command fails but the query runs fine in postgres. If I remove the schema from the coalesce and returning, the query succeeds.

column reference "user.name" is ambiguous

To Reproduce

CREATE SCHEMA IF NOT EXISTS "s";
CREATE TABLE "s"."user" ("id" SERIAL NOT NULL, "name" text NOT NULL, CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"));

INSERT INTO "s"."user" ("id", "name") VALUES (1, 'you') on conflict ("id") do update set "name" = coalesce("excluded"."name", "s"."user"."name") returning "s"."user"."id";

pg-mem version

2.8.1

@jtwebb
Copy link
Author

jtwebb commented Feb 24, 2025

Nevermind... Upgrading to 3.0.5 fixed it.

@jtwebb jtwebb closed this as completed Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant