From: Sabin Coanda <sabin.coanda@deuromedia.ro>
To: pgsql-admin@postgresql.org
Subject: raise doesn't add end of line
Date: Tue, 18 Nov 2008 12:40:13 +0200
Message-ID: <gfu63d$5jd$1@news.hub.org> (raw)
Hi there,
I upgrade "PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe
(GCC) 3.4.2 (mingw-special)" to "PostgreSQL 8.3.5, compiled by Visual C++
build 1400".
I found running a function which logs many logs has different behavior in
command line comparing with the query window output pane of pgAdmin.
I found that many RAISE statements in a function no more
adds end of line (CR/LF) on every message, even if it contains chr(10)
explicitely. Just when the function ends, or inserting chr(10) in the middle
of the message a CR/LF is added in the log.
For instance consider the function:
CREATE OR REPLACE FUNCTION r()
RETURNS void AS
$BODY$begin
raise notice 'Break the 1st%line...', chr(10);
raise notice 'eol on 2nd line...%', chr(10);
raise notice '3rd line';
raise notice '4th line';
end; $BODY$
LANGUAGE 'plpgsql' VOLATILE
COST 100;
ALTER FUNCTION r() OWNER TO postgres;
Run it:
SELECT r()
On windows command prompt you get a right log:
NOTICE: Break the 1st
line...
NOTICE: eol on 2nd line...
NOTICE: 3rd line
NOTICE: 4th line
But on pgAdmin output pane, you get a wrong log:
NOTICE: Break the 1st
line...NOTICE: eol on 2nd line...NOTICE: 3rd lineNOTICE: 4th line
Sabin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: sabin.coanda@deuromedia.ro
Subject: Re: raise doesn't add end of line
In-Reply-To: <gfu63d$5jd$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox