Re: Does PostgreSQL support job? - Mailing list pgsql-sql

From Daniel Caune
Subject Re: Does PostgreSQL support job?
Date
Msg-id 1E293D3FF63A3740B10AD5AAD88535D201755A97@UBIMAIL1.ubisoft.org
Whole thread Raw
In response to Does PostgreSQL support job?  ("Daniel Caune" <daniel.caune@ubisoft.com>)
Responses Re: Does PostgreSQL support job?  (Markus Schaber <schabi@logix-tt.com>)
List pgsql-sql
> > 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.
>

Yes, indeed, that was the idea!


pgsql-sql by date:

Previous
From: Markus Schaber
Date:
Subject: Re: Changing the transaction isolation level within the stored
Next
From: Markus Schaber
Date:
Subject: Re: Does PostgreSQL support job?