Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 637CA4762E3 for ; Fri, 24 Jan 2003 03:14:22 -0500 (EST) Received: from web80312.mail.yahoo.com (web80312.mail.yahoo.com [66.218.79.28]) by postgresql.org (Postfix) with SMTP id 5ECEC477031 for ; Fri, 24 Jan 2003 02:41:10 -0500 (EST) Message-ID: <20030124074110.57736.qmail@web80312.mail.yahoo.com> Received: from [203.87.150.116] by web80312.mail.yahoo.com via HTTP; Thu, 23 Jan 2003 23:41:10 PST Date: Thu, 23 Jan 2003 23:41:10 -0800 (PST) From: Ludwig Lim Subject: Re: plpgsql: debugging To: Oliver Vecernik Cc: PostgreSQL Mailing List In-Reply-To: <3E30A718.9080703@aon.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/388 X-Sequence-Number: 11253 --- Oliver Vecernik wrote: > Hi, > > Searching Google I found a thread in July 2001 > concerning the facilities > for debugging plpgsql functions. The actual answer > was: it should be > improved. > > What is the best way to debug a plpgsql function? > > Oliver This may not be the best way since its a bit crude. Try using RAISE NOTICE every now then to monitor the values of variables in the screen and record it in log file. Example : RAISE NOTICE ''Initial value of variable = %'',v_variable; /* Do some computation ... */ RAISE NOTICE ''Value of variable after operation = %'',v_variable; hope that helps, ludwig __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com