Skip to content

PostgresTypes returns types that aren't visible in the current schema #357

Open
@osi

Description

@osi
  • Driver: 0.8.6

PostgresTypes does a LEFT JOIN against the namespaces, resulting in multiple types being returned if the type is defined in multiple namespaces

+ " LEFT "
+ " JOIN (select ns.oid as nspoid, ns.nspname, r.r "

I have a type that is defined in multiple schemas (the schema is a "version", and application code is only using a specific version). This is controlled by the active schema, and current_schemas will only return a single one. If I have a type defined in 3 schemas, I will receive three results from PostgresTypes as it does a LEFT JOIN against the visible namespaces rather than an INNER JOIN.

If the LEFT JOIN behavior is desired, adding the namespace to the returned object would allow filtering in application code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions