Re: Does PostgreSQL support job?

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Does PostgreSQL support job?
Дата
Msg-id 43E2144D.4030901@logix-tt.com
обсуждение исходный текст
Ответ на Re: Does PostgreSQL support job?  ("Daniel Caune" <daniel.caune@ubisoft.com>)
Ответы Re: Does PostgreSQL support job?
Список pgsql-sql
Hi, Daniel,

Daniel Caune wrote:

> I'm not sure to understand.  Why calling a function from a script is different from executing a series of SQL
commands? I mean, I can run a script defined as follows:
 
> 
> SELECT myjob();
> 
> where myjob is a stored procedure such as:
> 
> CREATE OR REPLACE FUNCTION myjob()
>   RETURNS void
> AS $$
>   <a-lot-of-complex-stuff-here>
> END;
> $$ LANGUAGE PLPGSQL;
> 
> Does that make sense?

It does make sense if myjob() does more than just execute a bunch of
statements, e. G. it contains if(), loops or something else.

PLPGSQL is turing complete, plain SQL is not.

Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


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

Предыдущее
От: christian.michels@eifelgeist.com
Дата:
Сообщение: Re: executing dynamic commands
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: Changing the transaction isolation level within the stored