Search code examples
postgresqltriggersauto-update

Are there any system tables auto update in postgresql when postgresql server startup?


I want to use Postgresql 9.2.2 to store my applications' data. I had to build a trigger wich should based on Database level( When the database startup , this trigger will fired and executed.), Are there any tables auto update when postgresql server startup, in this way i could create a trigger on this table when server startup! Thanks a lot and best regards!


Solution

  • You can't create triggers on system tables.

    Two options occur to me:

    1. Do something on application startup, not database startup.
    2. Add a "psql" call to the end of the pg-server startup script.