You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{(pgVersion.IsGreaterOrEqual(10)?"attidentity != ''":"FALSE")} AS isidentity,
36
36
CASE WHEN typ.typtype = 'd' THEN typ.typtypmod ELSE atttypmod END AS typmod,
37
37
CASE WHEN atthasdef THEN (SELECT pg_get_expr(adbin, cls.oid) FROM pg_attrdef WHERE adrelid = cls.oid AND adnum = attr.attnum) ELSE NULL END AS default,
38
-
CASE WHEN col.is_updatable = 'YES' THEN true ELSE false END AS is_updatable,
38
+
CASE WHEN ((cls.relkind = ANY (ARRAY['r'::""char"", 'p'::""char""]))
39
+
OR ((cls.relkind = ANY (ARRAY['v'::""char"", 'f'::""char""]))
40
+
AND pg_column_is_updatable((cls.oid)::regclass, attr.attnum, false)))
41
+
AND attr.attidentity NOT IN ('a') THEN 'true'::boolean
42
+
ELSE 'false'::boolean
43
+
END AS is_updatable,
39
44
EXISTS (
40
45
SELECT * FROM pg_index
41
46
WHERE pg_index.indrelid = cls.oid AND
@@ -53,9 +58,6 @@ FROM pg_attribute AS attr
53
58
JOIN pg_type AS typ ON attr.atttypid = typ.oid
54
59
JOIN pg_class AS cls ON cls.oid = attr.attrelid
55
60
JOIN pg_namespace AS ns ON ns.oid = cls.relnamespace
56
-
LEFT OUTER JOIN information_schema.columns AS col ON col.table_schema = nspname AND
57
-
col.table_name = relname AND
58
-
col.column_name = attname
59
61
WHERE
60
62
atttypid <> 0 AND
61
63
relkind IN ('r', 'v', 'm') AND
@@ -80,9 +82,6 @@ FROM pg_attribute AS attr
80
82
JOIN pg_type AS typ ON attr.atttypid = typ.oid
81
83
JOIN pg_class AS cls ON cls.oid = attr.attrelid
82
84
JOIN pg_namespace AS ns ON ns.oid = cls.relnamespace
83
-
LEFT OUTER JOIN information_schema.columns AS col ON col.table_schema = nspname AND
0 commit comments