Thread: Regular function
Hello colleagues !
I have to write pl/pgsql function that has to be triggered not before/after insert, but in definite time. Does postgresql allows to do this ?
Thanks a lot.
--
Best regards,
Sincerely yours,
Yuriy Rusinov.
Best regards,
Sincerely yours,
Yuriy Rusinov.
On 3/29/2013 10:54 AM, Yuriy Rusinov wrote: > I have to write pl/pgsql function that has to be triggered not > before/after insert, but in definite time. Does postgresql allows to > do this ? there is no 'cron' built into postgresql. you could write your function, then have an external cron job invoke it, like: psql -c "select yourfunction()" -- john r pierce 37N 122W somewhere on the middle of the left coast
On 3/29/2013 11:13 AM, John R Pierce wrote: > there is no 'cron' built into postgresql. actually, there is pgAgent, which is associated with the pgAdmin package, this implements a cron-like facility to postgres. http://www.pgadmin.org/docs/1.16/pgagent.html -- john r pierce 37N 122W somewhere on the middle of the left coast
On Sat, Mar 30, 2013 at 3:13 AM, John R Pierce <pierce@hogranch.com> wrote:
-- Note also that if you are planning some development with the coming release 9.3, you could also achieve that inside the server by using a custom bgworker.On 3/29/2013 10:54 AM, Yuriy Rusinov wrote:there is no 'cron' built into postgresql. you could write your function, then have an external cron job invoke it, like: psql -c "select yourfunction()"I have to write pl/pgsql function that has to be triggered not before/after insert, but in definite time. Does postgresql allows to do this ?
Michael
Thanks a lot.
On Fri, Mar 29, 2013 at 10:22 PM, John R Pierce <pierce@hogranch.com> wrote:
On 3/29/2013 11:13 AM, John R Pierce wrote:actually, there is pgAgent, which is associated with the pgAdmin package, this implements a cron-like facility to postgres.there is no 'cron' built into postgresql.
http://www.pgadmin.org/docs/1.16/pgagent.html
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Best regards,
Sincerely yours,
Yuriy Rusinov.
unsubscribe
On Fri, Mar 29, 2013 at 10:54 AM, Yuriy Rusinov <yrusinov@gmail.com> wrote:
Hello colleagues !I have to write pl/pgsql function that has to be triggered not before/after insert, but in definite time. Does postgresql allows to do this ?Thanks a lot.--
Best regards,
Sincerely yours,
Yuriy Rusinov.
unsubscribe
On Fri, Mar 29, 2013 at 10:54 AM, Yuriy Rusinov <yrusinov@gmail.com> wrote:
Hello colleagues !I have to write pl/pgsql function that has to be triggered not before/after insert, but in definite time. Does postgresql allows to do this ?Thanks a lot.--
Best regards,
Sincerely yours,
Yuriy Rusinov.
On 03/30/2013 08:42 PM, ajmcello wrote: > unsubscribe > If you want to unsubscribe: To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Adrian Klaver adrian.klaver@gmail.com
unsubscribe
On Sat, Mar 30, 2013 at 9:07 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
On 03/30/2013 08:42 PM, ajmcello wrote:unsubscribe
If you want to unsubscribe:Adrian Klaver
adrian.klaver@gmail.com
Hello !
One's more question arises. In my function sometimes I have to init random number generator via gsl_rng * r = gsl_rng_alloc (gsl_rng_taus); see http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-initialization.html, may I keep this generator between connections to database ?
Thanks a lot.
Yuriy Rusinov.