dbTalk Databases Forums  

Control table changes

comp.databases.postgresql comp.databases.postgresql


Discuss Control table changes in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
EBMB
 
Posts: n/a

Default Control table changes - 06-24-2009 , 12:17 PM






Hello all,
I would like to know if it is possible to control changes in the
structure of a table...

I tried to make a trigger to monitor the updates in the table
pg_attribute. Example: when a column is created that table is updated,
but the system tables do not accept triggers. :-(

Someone would have any suggestions?

Thanks in advance!

Cheers,
Eduardo.

Reply With Quote
  #2  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Control table changes - 06-25-2009 , 01:02 AM






EBMB <eduardo.bmbarbosa (AT) gmail (DOT) com> wrote:
Quote:
Hello all,
I would like to know if it is possible to control changes in the
structure of a table...

I tried to make a trigger to monitor the updates in the table
pg_attribute. Example: when a column is created that table is updated,
but the system tables do not accept triggers. :-(

Someone would have any suggestions?
There is no simple way to do that, but you can log all DDL-commands with
log_statement = 'ddl'
in your postgresql.conf to log all such statements.


Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.