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 83DBA9DCAD4 for ; Thu, 2 Feb 2006 10:25:29 -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 61339-07 for ; Thu, 2 Feb 2006 10:25:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (serval.logix-tt.com [213.239.221.42]) by postgresql.org (Postfix) with ESMTP id C96099DC9D9 for ; Thu, 2 Feb 2006 10:25:25 -0400 (AST) Received: from kingfisher.intern.logix-tt.com (Md470.m.pppool.de [89.49.212.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 6DB48244046; Thu, 2 Feb 2006 15:25:32 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id ED0F7181C209A; Thu, 2 Feb 2006 15:25:32 +0100 (CET) Message-ID: <43E2165C.1000409@logix-tt.com> Date: Thu, 02 Feb 2006 15:25:32 +0100 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Caune Cc: Owen Jacobson , pgsql-sql@postgresql.org Subject: Re: Does PostgreSQL support job? References: <1E293D3FF63A3740B10AD5AAD88535D201755A97@UBIMAIL1.ubisoft.org> In-Reply-To: <1E293D3FF63A3740B10AD5AAD88535D201755A97@UBIMAIL1.ubisoft.org> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.127 required=5 tests=[AWL=0.127] X-Spam-Score: 0.127 X-Spam-Level: X-Archive-Number: 200602/22 X-Sequence-Number: 24032 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? [snip] >>>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! There's another reason: For updating the cron job SQL commands, you need root access (or at least shell access) to the database machine. For updating a stored procedure, you need just the appropriate rights in the database. On larger deployments, this can be an important difference. 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