aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/join_brackets2.sql
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/sql/suites/pg/join_brackets2.sql
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'yql/essentials/tests/sql/suites/pg/join_brackets2.sql')
-rw-r--r--yql/essentials/tests/sql/suites/pg/join_brackets2.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/pg/join_brackets2.sql b/yql/essentials/tests/sql/suites/pg/join_brackets2.sql
new file mode 100644
index 0000000000..8d665392ca
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/pg/join_brackets2.sql
@@ -0,0 +1,21 @@
+--!syntax_pg
+SELECT DISTINCT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype,
+att.attnotnull as not_null, att.atthasdef as has_default_val, des.description, seq.seqtypid
+FROM pg_catalog.pg_attribute att
+ JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+ JOIN pg_catalog.pg_namespace tn ON tn.oid=ty.typnamespace
+ JOIN pg_catalog.pg_class cl ON cl.oid=att.attrelid
+ JOIN pg_catalog.pg_namespace na ON na.oid=cl.relnamespace
+ LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=ty.typelem
+ LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+ LEFT OUTER JOIN (pg_catalog.pg_depend JOIN pg_catalog.pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid::int4=att.attnum
+ LEFT OUTER JOIN pg_catalog.pg_namespace ns ON ns.oid=cs.relnamespace
+ LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+ LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=att.attrelid AND des.objsubid::int4=att.attnum AND des.classoid='pg_class'::regclass)
+ LEFT OUTER JOIN pg_catalog.pg_sequence seq ON cs.oid=seq.seqrelid
+WHERE
+
+ att.attrelid = 12302::oid
+ AND att.attnum > 0
+ AND att.attisdropped IS FALSE
+ORDER BY att.attnum