X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 07E3B9DC899 for ; Thu, 2 Feb 2006 11:31:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78844-05 for ; Thu, 2 Feb 2006 11:31:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from matrix.gatewaynet.com (host2.dynacom.ondsl.gr [62.103.35.210]) by postgresql.org (Postfix) with ESMTP id 229A99DC817 for ; Thu, 2 Feb 2006 11:31:03 -0400 (AST) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id k12GXfOp008626; Thu, 2 Feb 2006 18:33:41 +0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id k12GXeGA008622; Thu, 2 Feb 2006 18:33:40 +0200 Date: Thu, 2 Feb 2006 18:33:40 +0200 (EET) From: Achilleus Mantzios To: Markus Schaber cc: Daniel Caune , Owen Jacobson , Subject: Re: Does PostgreSQL support job? In-Reply-To: <43E2144D.4030901@logix-tt.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.106 required=5 tests=[AWL=0.106] X-Spam-Score: 0.106 X-Spam-Level: X-Archive-Number: 200602/24 X-Sequence-Number: 24034 O Markus Schaber έγραψε στις Feb 2, 2006 : > 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 $$ > > > > 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. Hmmmm is SQL equally powerful as a pushdown automaton then??? Just kidding! > > Markus > -- -Achilleus