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.
PostgresTypesdoes aLEFT JOINagainst the namespaces, resulting in multiple types being returned if the type is defined in multiple namespacesr2dbc-postgresql/src/main/java/io/r2dbc/postgresql/codec/PostgresTypes.java
Lines 38 to 39 in ff5c93c
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_schemaswill only return a single one. If I have a type defined in 3 schemas, I will receive three results fromPostgresTypesas it does aLEFT JOINagainst the visible namespaces rather than anINNER JOIN.If the
LEFT JOINbehavior is desired, adding the namespace to the returned object would allow filtering in application code.