Received: from apache.smeso.fr (unknown [212.234.3.50]) by postgresql.org (Postfix) with ESMTP id EC82D475F83 for ; Fri, 19 Apr 2002 10:39:24 -0400 (EDT) Received: from STEPHFIXE (ocp.smeso.fr [192.168.168.35]) by apache.smeso.fr (8.9.3/8.9.3) with SMTP id QAA20007 for ; Fri, 19 Apr 2002 16:39:29 +0200 From: =?iso-8859-1?Q?St=E9phane_DEWITTE?= To: Subject: How to log outputs from pl/pgsql into a file ? Date: Fri, 19 Apr 2002 16:39:43 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Archive-Number: 200204/248 X-Sequence-Number: 7512 Hi everybody. I'm working un Linux SuSe7.0, Postgres 7.2 compiled from sources. I have a function in PL/pgSQL and I have to write some infos on screen. For that I use RAISE NOTICE ''Number %'',my_number; It works fine on screen, but now I want to log it on a different file each time (not the pog log). I've tried to make a shell (myshell) that calls the script psql mybase << EOF select my_func(); EOF and I make myshell > test.log I only have the retrun of my function, and not the 'raise' that only appears on screen. Idem if my shell is psql mybase << EOF \o test.log select my_func(); EOF and I have the same result. I guess it is possible ti have outputs written into a file (like "spool file" in SqlPlus for Oracle) but I didn't find anything on documentation for PL/pgSQL. Can I use raise notice for that ? And how ? And what else can I use ? Thanks a lot. Regards, Stephane.