Skip to content

Commit 1488622

Browse files
Support PostGIS extension on non-public schemas in PostgreSQL
1 parent b65255c commit 1488622

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugin/trino-postgresql/src/main/java/io/trino/plugin/postgresql/PostgreSqlClient.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,15 @@ public Optional<ColumnMapping> toColumnMapping(ConnectorSession session, Connect
592592
case "geometry":
593593
return Optional.of(geometryColumnMapping());
594594
}
595+
596+
// Handling of schema-qualified types
597+
// TODO: Find more reliable way to detect these types. The type name can be eg. "schema-name"."vector"
595598
if (jdbcTypeName.endsWith("\"vector\"")) {
596-
// TODO: Find more reliable way to detect vector type. The type name can be "schema-name"."vector"
597599
return Optional.of(vectorColumnMapping());
598600
}
601+
if (jdbcTypeName.endsWith("\"geometry\"")) {
602+
return Optional.of(geometryColumnMapping());
603+
}
599604

600605
switch (typeHandle.jdbcType()) {
601606
case Types.BIT:

0 commit comments

Comments
 (0)