Saleem EDAH-TALLY wrote:
Is there a way to run a pl/pgsql automatically at server startup ?

in your postgres startup script launch a session with `psql ... -c "some sql commands"` or `psql ... -f somescript.sql` ...


Is there a way to run a pl/pgsql function with an infinite loop as a daemon ?

functions are called from within a transaction. if you did this, that transaction would never end, and this would prevent VACUUM from cleaning up any freed tuples from newer than the start of that transaction. Not good. you could, however, have a system daemon that periodically invokes a plpgsql function.


Is there a way to start a pl/pgsql function that would persist after the user session has closed ?

no.


Is there a way for an unprivileged user to delegate a task (allowed by superuser) to a superuser ?

someone else will have to chime in here.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to