Re: Can we set time exception?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Can we set time exception?
Дата
Msg-id CAKFQuwYVJpjs0Z-Fy3kbUYbg5tFWEK8Vi9cD_P3Gr-OiwPw9Aw@mail.gmail.com
обсуждение исходный текст
Ответ на Can we set time exception?  (Shaozhong SHI <shishaozhong@gmail.com>)
Ответы Re: Can we set time exception?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Thu, Jul 13, 2023 at 7:46 AM Shaozhong SHI <shishaozhong@gmail.com> wrote:
In a Do statement, it calls function to work?

Can we set a time exception?

If the function responds with result in a given time, we take the result.

If the response of the function exceeds the time set, skip it.


No.  Function execution happens on a single thread (i.e., synchronous) in a stacked manner.  There is no way for the caller to get processing control back other than the callee returning.

If your choice of procedural language can overcome the synchronous execution limitation then sure.  SQL and pl/pgsql cannot.

David J.

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

Предыдущее
От: "Voillequin, Jean-Marc"
Дата:
Сообщение: RE: Can we set time exception?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Can we set time exception?