X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 430FA9DCA5A for ; Fri, 3 Mar 2006 11:06:30 -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 66785-02 for ; Fri, 3 Mar 2006 11:06:33 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 7B56C9DC952 for ; Fri, 3 Mar 2006 11:06:27 -0400 (AST) Received: from smtp.imatech.net (smtp.imatech.net [81.255.215.253]) by svr4.postgresql.org (Postfix) with ESMTP id 952765AF038 for ; Fri, 3 Mar 2006 15:06:32 +0000 (GMT) X-AuthUser: olivier.boissard@cerene.fr Received: from [200.200.200.35] ([195.6.193.141]:52428) by smtp.imatech.net with [XMail 1.21 ESMTP Server] id for from ; Fri, 3 Mar 2006 16:05:37 +0100 Message-ID: <44085B4E.7090102@cerene.fr> Date: Fri, 03 Mar 2006 16:05:50 +0100 From: Olivier Boissard Organization: cerene services User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Eisentraut Cc: pgsql-admin@postgresql.org Subject: Re: call an external script from pgsql References: <440714EA.7010506@cerene.fr> <200603021739.45397.peter_e@gmx.net> In-Reply-To: <200603021739.45397.peter_e@gmx.net> Content-Type: multipart/mixed; boundary="------------040900060706050704070801" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/36 X-Sequence-Number: 20793 This is a multi-part message in MIME format. --------------040900060706050704070801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Peter Eisentraut wrote: >Am Donnerstag, 2. März 2006 16:53 schrieb Olivier Boissard: > > >>I would like to call an external "shell" script from a trigger. >>I use actually pgplsh. It works fine but there is a lot of problem with >>special characters. >> >> > >Details please. > > > >>In addition I can not compile this language any more.. >> >> > >Details please. > > > >>Do you know others solutions to call an external script? >>Is it possible with python ? >> >> > >plperlu and plpythonu also work. > > > I created a trigger on a table that contains different log information. This trigger launched a plsh function that execute a shell script to print le new record a the table (with CUPS) It worked fine but when I upgrated postgresql 7.4 -> 8.1 I was unable to recompile properly pgplsh. So I copied old libraries and sql files from a backup. It works . When I make a dump (pg_dump and psql ) the restoration fails because of specific characters used in pgplsh. And I realized that there is poor documentation on the web. That is the reason why I consider now to change this system. Olivier --------------040900060706050704070801 Content-Type: text/x-vcard; charset=utf-8; name="olivier.boissard.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="olivier.boissard.vcf" begin:vcard fn:Olivier Boissard n:Boissard;Olivier org:Cerene Services adr:;;3 rue Archimede;La Chapelle Saint Luc;;10000;France email;internet:olivier.boissard@cerene.fr tel;work:03.25.74.11.78 tel;fax:03.25.78.39.67 version:2.1 end:vcard --------------040900060706050704070801--