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

New catalog doesn't resolve pg_catalog arguments properly #538

Closed
maxhawkins opened this issue Jun 7, 2020 · 1 comment · Fixed by #637
Closed

New catalog doesn't resolve pg_catalog arguments properly #538

maxhawkins opened this issue Jun 7, 2020 · 1 comment · Fixed by #637
Labels
bug Something isn't working regression

Comments

@maxhawkins
Copy link
Contributor

CREATE FUNCTION f(x TIMESTAMPTZ) RETURNS void AS '' LANGUAGE sql;
CREATE FUNCTION f(x timestamp with time zone) RETURNS void AS '' LANGUAGE sql;

-- name: F :one
SELECT f(1);

Using the experimental parser, this SQL should return an error about a duplicate function. Instead it compiles with no issue.

The problem is TIMESTAMPTZ resolves to type timestamptz and timestamp with time zone resolves to pg_catalog.timestamptz. The catalog doesn't recognize that these refer to the same type, so it allows both functions to be created.

@maxhawkins
Copy link
Contributor Author

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants