Search Postgresql Archives

Trigger (or something similar) on table rename?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.  I'm wondering about possibilities for taking action when a table is renamed.

Specifically in this case, I'm using table_log, which when you use it on a table creates a new table, sequence and index that is tied to the table name.  Of course, if the oriignal table is renamed, the other relations aren't.  So I rename table to table_old, and then create a new version of table, but the table logging fails because of the already-existing relations that table_log created.

I could of course rename them manually, or create a function to do it, but that would still need to be manually invoked.  I haven't really used listen/notify--I assume it could do this, but there would need to be some kind of process actively listening?

Something like a trigger on the table rename would be ideal for my purposes.  Anything like that possible?  Thanks!

Ken

--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux