Skip to content

Commit d9aec54

Browse files
danieljharveyhasura-bot
authored andcommitted
chore: change array lookup in introspection
PR-URL: hasura/graphql-engine-mono#10496 GitOrigin-RevId: 9035dcd241e46543b9c20339073698871be39666
1 parent 4dc57ec commit d9aec54

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

server/src-rsr/citus_table_metadata.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ LEFT JOIN LATERAL
113113
LEFT JOIN pg_catalog.pg_type base_type
114114
ON "type".typtype = 'd' AND base_type.oid = "type".typbasetype
115115
LEFT JOIN pg_catalog.pg_type array_type
116-
ON array_type.typarray = "type".oid
116+
ON "type".typelem = array_type.oid AND "type".typcategory = 'A'
117117
WHERE "column".attrelid = "table".oid
118118
-- columns where attnum <= 0 are special, system-defined columns
119119
AND "column".attnum > 0

server/src-rsr/cockroach_table_metadata.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ FROM "tabletable" "table"
4141
-- $1 parameter provides JSON array of tracked tables
4242
-- FROM
4343
-- ( SELECT "tracked"."name" AS "table_name",
44-
-- "tracked"."schema" AS "table_schema"
44+
-- "tracked"."schema" AS "table_schema"cockroach
4545
-- FROM jsonb_to_recordset($1::jsonb) AS "tracked"("schema" text, "name" text)
4646
-- ) "tracked_table"
4747

@@ -86,7 +86,7 @@ LEFT JOIN LATERAL
8686
LEFT JOIN pg_catalog.pg_type base_type
8787
ON "type".typtype = 'd' AND base_type.oid = "type".typbasetype
8888
LEFT JOIN pg_catalog.pg_type array_type
89-
ON array_type.typarray = "type".oid
89+
ON "type".typelem = array_type.oid AND "type".typcategory = 'A'
9090
WHERE "column".attrelid = "table".oid
9191
-- columns where attnum <= 0 are special, system-defined columns
9292
AND "column".attnum > 0

server/src-rsr/pg_table_metadata.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ LEFT JOIN LATERAL
106106
LEFT JOIN pg_catalog.pg_type base_type
107107
ON "type".typtype = 'd' AND base_type.oid = "type".typbasetype
108108
LEFT JOIN pg_catalog.pg_type array_type
109-
ON array_type.typarray = "type".oid
109+
ON "type".typelem = array_type.oid AND "type".typcategory = 'A'
110110
WHERE "column".attrelid = "table".oid
111111
-- columns where attnum <= 0 are special, system-defined columns
112112
AND "column".attnum > 0

0 commit comments

Comments
 (0)