Hi,
Is it possible to have a query that that would run on a different table every time it is executed? This query would be integrated in a trigger function that would serve a trigger that fires every time a new table is inserted in the database. This would be monitored through the individual records in a certain "index" table which would have a column that holds the table names. How can I sort of select these string values that hold the table names and cast them in actual "table names" type in my query?
All my searching leaded to the EXECUTE command but didn't quite figured out how that works when I need to return the whole table and not just a RECORD type.
My specific case:
INSERT INTO table(column)
SELECT ....
FROM varying table
Regards,
Nart