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

Using "using" on joins leads to wrong "ambiguous reference" errors #405

Open
rswheeldon opened this issue Jun 5, 2024 · 0 comments
Open

Comments

@rswheeldon
Copy link

Describe the bug

Doing a join with "using" for a column ID implies it's not ambiguous - it doesn't matter which one you pick because they're the same. Postgres realizes this but pg-mem doesn't.

column reference "x" is ambiguous

🐜 This seems to be an execution error, which means that your request syntax seems okay,
    but the resulting statement cannot be executed → Probably not a pg-mem error.

*️⃣ Reconsituted failed SQL statement: SELECT x  FROM foo  INNER JOIN bar  USING (x)

To Reproduce

create table foo(x integer);
create table bar (x integer);

select x from foo join bar using (x);

pg-mem version

2.8.1 (reproducible in playground at time of writing)

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
  NODES
COMMUNITY 2
Project 3
USERS 1