1 Answer
- Newest
- Most votes
- Most comments
1
That is a simple catalog query that shows information about a column in a table.
SELECT c.oid, a.attnum, a.attname, c.relname, n.nspname, a.attnotnull OR (t.typtype = 'd' AND t.typnotnull), pg_catalog.pg_get_expr(d.adbin, d.adrelid) LIKE '%nextval(%'
FROM pg_catalog.pg_class c
JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid)
JOIN pg_catalog.pg_attribute a ON (c.oid = a.attrelid)
JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid)
LEFT JOIN pg_catalog.pg_attrdef d ON (d.adrelid = a.attrelid AND d.adnum = a.attnum)
JOIN (SELECT 3285788 AS oid , 2 AS attnum) vals ON (c.oid = vals.oid AND a.attnum = vals.attnum)
JOIN (SELECT 3285788 AS oid , 2 AS attnum) vals is the critical piece here.
3285788is the unique OID for a table (pg_class).2is the column number for table (pg_attribute).- It is an equal join so it only retrieves data for this one column.
So the query is getting the column name, nullable, and default value if any from that particular column. If you are seeing it a lot, QuickSight might be executing this for every column.
I would expect this is being done by QuickSight in order to build queries needed for reports.
Relevant content
asked a year ago
asked a year ago
- AWS OFFICIALUpdated 6 months ago
