possible new feature: asynchronous sql or something like oracles dbms_job.submit

Поиск
Список
Период
Сортировка
От Vorarlberger
Тема possible new feature: asynchronous sql or something like oracles dbms_job.submit
Дата
Msg-id CALtUeZbLJx=5V6revfTV6txi7kM4dw=_4=jsrad3eb=GY9C18A@mail.gmail.com
обсуждение исходный текст
Ответы Re: possible new feature: asynchronous sql or something like oracles dbms_job.submit  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
hi<br /><br />i switched back from oracle xe for many reasons and because the lack of pl/java in oralce xe. and
posgesqlis the best open source db i know! sadly what i realy miss is the possibility of asynchronous sql. which means
theneed to perform an sql in a completely different new session. something i could do in oracle with dbms_job.submit.
<br/><br />there are may reasons for the need of this feature and not because of the scheduler. just one actual need:
assumeyou have a table and every time something gets inserted you want to notify another pq-application. lets say this
tableis part of your crm application. but every new inserted customer is an interesting part of your accounting
application.instead of time scheduling or polling you could use asynchronous sql. simply add a trigger on your customer
tableand execute the add_customer_to_accounting pgsql interface in its own session. if it fails it is not the fault of
thecrm application and should not raise a exception and rollback. and of course triggering an interface for a foreign
applicationshould not be in the native transaction. also your crm application do not want to wait on every insert for a
interfaceto complete. <br /><br />before someone is going to say this is a q. no its not realy a q - because you do not
needa consumer daemon. there is absolutely no need for an additional daemon. you simply trigger a procedure and send it
tothe background like you would do in a unix shell. you can also use dbms_jobs for parallel execution or to recalculate
materialviews.<br /><br />so what i would like to ask you if you can feel comfortable with this idea and possible
implementthis into postgres 10.x?<br /><br />thanks and cheers<br />chris<br /><br /> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: daveg
Дата:
Сообщение: Re: error: could not find pg_class tuple for index 2662
Следующее
От: "Petro Meier"
Дата:
Сообщение: PQescapeByteaConn - returns wrong string for PG9.1 Beta3