Skip to content

New catalog doesn't resolve pg_catalog arguments properly #538

@maxhawkins

Description

@maxhawkins
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions