github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/sem/tree/testdata/pretty/join3.ref.golden.short (about) 1 // Code generated by TestPretty. DO NOT EDIT. 2 // GENERATED FILE DO NOT EDIT 3 1: 4 - 5 SELECT 6 NULL AS table_cat, 7 n.nspname AS table_schem, 8 ct.relname AS table_name, 9 NOT i.indisunique AS non_unique, 10 NULL AS index_qualifier, 11 ci.relname AS index_name, 12 CASE i.indisclustered 13 WHEN true THEN 1 14 ELSE CASE am.amname 15 WHEN 'hash' THEN 2 16 ELSE 3 17 END 18 END 19 AS type, 20 (i.keys).n AS ordinal_position, 21 btrim( 22 pg_catalog.pg_get_indexdef( 23 ci.oid, 24 (i.keys).n, 25 false 26 ), 27 '"' 28 ) 29 AS column_name, 30 CASE am.amcanorder 31 WHEN true 32 THEN CASE i.indoption[(i.keys).n - 1] 33 & 1 34 WHEN 1 THEN 'D' 35 ELSE 'A' 36 END 37 ELSE NULL 38 END 39 AS asc_or_desc, 40 ci.reltuples AS cardinality, 41 ci.relpages AS pages, 42 pg_catalog.pg_get_expr( 43 i.indpred, 44 i.indrelid 45 ) 46 AS filter_condition 47 FROM 48 pg_catalog.pg_class AS ct 49 JOIN pg_catalog.pg_namespace AS n ON 50 ct.relnamespace = n.oid 51 JOIN ( 52 SELECT 53 i.indexrelid, 54 i.indrelid, 55 i.indoption, 56 i.indisunique, 57 i.indisclustered, 58 i.indpred, 59 i.indexprs, 60 information_schema._pg_expandarray( 61 i.indkey 62 ) 63 AS keys 64 FROM 65 pg_catalog.pg_index AS i 66 ) 67 AS i ON ct.oid = i.indrelid 68 JOIN pg_catalog.pg_class AS ci ON 69 ci.oid = i.indexrelid 70 JOIN pg_catalog.pg_am AS am ON 71 ci.relam = am.oid 72 WHERE 73 true 74 AND n.nspname = 'public' 75 AND ct.relname = 'j' 76 ORDER BY 77 non_unique, 78 type, 79 index_name, 80 ordinal_position 81 82