1.I have a table nodes with node_id(PK),node_name(name),connstr(text),last_snap_id(integer) and this table has 1 row fill with 1,local,dbname = postgres,0
2.I have a table indexes_list with node_id(PK),indexrelid(PK),schemaname,indexrelname which is empty
3.I have to collect the data from pg_stat_user_indexes the columns are indexrelid,schemaname,indexrelname
Questions: How i do fetch data from pg_stat_user_indexes to load into my indexes_list table and the same time and if i use 2 select statement in one i get error.