SELECT FROM 'varying_table'

Поиск
Список
Период
Сортировка
От Nart Tamash
Тема SELECT FROM 'varying_table'
Дата
Msg-id CAM1YuxQk7W-0d+xuDXRJ1gojq5gm0KRW3MQTX9EhMFCQnuXA8w@mail.gmail.com
обсуждение исходный текст
Ответы Re: SELECT FROM 'varying_table'  (Willy-Bas Loos <willybas@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Updating a chkpass column in postgres v8.1.21
Следующее
От: Alejandro Barragan
Дата:
Сообщение: Page Usage Information