SELECT FROM 'varying_table' - Mailing list pgsql-novice

From Nart Tamash
Subject SELECT FROM 'varying_table'
Date
Msg-id CAM1YuxQk7W-0d+xuDXRJ1gojq5gm0KRW3MQTX9EhMFCQnuXA8w@mail.gmail.com
Whole thread Raw
Responses Re: SELECT FROM 'varying_table'
List pgsql-novice
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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Updating a chkpass column in postgres v8.1.21
Next
From: Alejandro Barragan
Date:
Subject: Page Usage Information