X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7500752A3A for ; Tue, 19 Jul 2005 12:58:16 -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 62253-10 for ; Tue, 19 Jul 2005 15:58:07 +0000 (GMT) Received: from krogh.officenet.no (unknown [128.39.244.194]) by svr1.postgresql.org (Postfix) with ESMTP id 5905B52A1B for ; Tue, 19 Jul 2005 12:58:06 -0300 (ADT) Received: from krogh.officenet.no (krogh.officenet.no [127.0.0.1]) by krogh.officenet.no (Postfix) with ESMTP id 572B474BAE for ; Tue, 19 Jul 2005 17:58:06 +0200 (CEST) From: Andreas Joseph Krogh Organization: OfficeNet AS To: pgsql-sql@postgresql.org Subject: Re: echo/printf function in plpgsql Date: Tue, 19 Jul 2005 17:58:05 +0200 User-Agent: KMail/1.7.2 References: <200507191651.28648.andreak@officenet.no> <42DD19DE.60106@archonet.com> In-Reply-To: <42DD19DE.60106@archonet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507191758.05273.andreak@officenet.no> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/165 X-Sequence-Number: 22143 On Tuesday 19 July 2005 17:18, Richard Huxton wrote: > Andreas Joseph Krogh wrote: > > Hi all! > > > > Is there a way of echo'ing a string(like "raise notice 'this is id%', > > id") from plpgsql? I want to echo/print it to STDOUT 'cause the > > notice-mechanism produces too much noise IMH. > > Your function is running in the backend. You don't have a STDOUT > (although you might have redirected STDERR for logging). I see. Can I make the ouput somehow less verbose? It spits out a lot of noise for each "NOTICE": ==================== psql:ocs_process_projecct.sql:48: NOTICE: trying to insert parent_id: 87, child_id: 91 CONTEXT: SQL statement "SELECT processSubProject( $1 , $2 , $3 )" PL/pgSQL function "processsubproject" line 7 at perform SQL statement "SELECT processSubProject( $1 , $2 , $3 )" PL/pgSQL function "processsubproject" line 7 at perform SQL statement "SELECT processSubProject( $1 , $2 , $3 )" PL/pgSQL function "build_project_children" line 11 at perform ==================== -- AJk