X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 41561D1B26C for ; Thu, 8 Jul 2004 13:49:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63166-06 for ; Thu, 8 Jul 2004 16:49:47 +0000 (GMT) Received: from mpls-qmqp-04.inet.qwest.net (mpls-qmqp-04.inet.qwest.net [63.231.195.115]) by svr1.postgresql.org (Postfix) with SMTP id DFD17D1B260 for ; Thu, 8 Jul 2004 13:49:44 -0300 (ADT) Received: (qmail 77332 invoked by uid 0); 8 Jul 2004 16:49:44 -0000 Received: from mpls-pop-04.inet.qwest.net (63.231.195.4) by mpls-qmqp-04.inet.qwest.net with QMQP; 8 Jul 2004 16:49:44 -0000 Received: from 63-227-127-37.dnvr.qwest.net (HELO ?10.0.0.2?) (63.227.127.37) by mpls-pop-04.inet.qwest.net with SMTP; 8 Jul 2004 16:49:44 -0000 Date: Thu, 08 Jul 2004 10:50:46 -0600 Message-Id: <1089305446.32059.7.camel@localhost.localdomain> From: "Scott Marlowe" To: "erdenemandal" Cc: pgsql-admin@postgresql.org Subject: Re: In-Reply-To: <008401c4628d$0eb72190$a400a8c0@teltra14> References: <008401c4628d$0eb72190$a400a8c0@teltra14> Content-Type: text/plain Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/108 X-Sequence-Number: 14176 On Mon, 2004-07-05 at 06:39, erdenemandal wrote: > Hello, > > > > My name is Erdenemandal. I am using PostgreSQL and plpgsql language. I > am wondering , is it possible to call shell programm from plpgsql > language. I want to create XML file from Database. > > > > I mean I want to use plpgsql language for export settings (in > database) in XML format. There are two classes of procedural languages in PostgreSQL, safe and unsafe. Safe procedural languages don't do anything with file systems, email, etc... plpgsql is one of the safe languages. Unsafe languages are allowed to do more dangerous things, like play with the file system etc... There's a stub called pl/sh out there somewhere that literally lets you pretty much just call shell scripts from within postgresql. Any other unsafe language will also let you do this, like tcl, perl, or php.