apart from checking if table already exists, how can we verify if it is current user-defined table in postgres
CREATE TABLE IF NOT EXISTS tbl1()
how can we verify it was created by current user if already exists?
Try Like This
SELECT count(*) as cnt FROM pg_tables t where tableowner=current_user
and tablename='Tablename' and schemaname='schemaneme'
if cnt = 0 then (CREATE Table TableName)
tablename='Tablename' change to tablename in (tablenames). count(*)` Change to tablename into rec. Rec as record. now use for loop for create table