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
select column_names from(
selectt.relnameas table_name,
i.relnameas index_name,
array_to_string(array_agg(a.attname), ', ') as column_names
from
pg_class t,
pg_class i,
pg_index ix,
pg_attribute a
wheret.oid=ix.indrelidandi.oid=ix.indexrelidanda.attrelid=t.oidanda.attnum= ANY(ix.indkey)
andt.relkind='r'andt.relnamelike'%'group byt.relname,
i.relnameorder byt.relname,
i.relname) as res
where table_name ='table_name';
查出的table_name会是子表的名称
The text was updated successfully, but these errors were encountered:
Postgresql采用以下sql查找
ON CONFLICT(key)
,在分表的情况下会找不到key查出的table_name会是子表的名称
The text was updated successfully, but these errors were encountered: