X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 60B079DCD25 for ; Sat, 10 Dec 2005 12:22:27 -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 79949-06 for ; Sat, 10 Dec 2005 12:22:26 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 45B069DCD01 for ; Sat, 10 Dec 2005 12:22:24 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id jBAGMH8c081560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Dec 2005 09:22:20 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id jBAGMHRL042134; Sat, 10 Dec 2005 09:22:17 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id jBAGMGgD042133; Sat, 10 Dec 2005 09:22:16 -0700 (MST) (envelope-from mfuhr) Date: Sat, 10 Dec 2005 09:22:15 -0700 From: Michael Fuhr To: Yves Vindevogel Cc: pgsql-performance@postgresql.org Subject: Re: Executing a shell command from a PG function Message-ID: <20051210162215.GA42041@winnie.fuhr.org> References: <439AFA8C.5070303@implements.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <439AFA8C.5070303@implements.be> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.028 required=5 tests=[AWL=0.028] X-Spam-Score: 0.028 X-Spam-Level: X-Archive-Number: 200512/270 X-Sequence-Number: 16091 On Sat, Dec 10, 2005 at 04:55:56PM +0100, Yves Vindevogel wrote: > Is it possible to run a shell script, passing values of fields to it, in > a Postgres function ? Not directly from SQL or PL/pgSQL functions, but you can execute shell commands with the untrusted versions of PL/Perl, PL/Tcl, PL/Python, etc. There's even a PL/sh: http://pgfoundry.org/projects/plsh/ -- Michael Fuhr