Lists: | pgsql-bugs |
---|
From: | "" <sabin(dot)coanda(at)deuromedia(dot)ro> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4536: raise doesn't add end of line |
Date: | 2008-11-17 15:23:49 |
Message-ID: | 200811171523.mAHFNnF7090214@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4536
Logged by:
Email address: sabin(dot)coanda(at)deuromedia(dot)ro
PostgreSQL version: 8.3.5
Operating system: Windows XP
Description: raise doesn't add end of line
Details:
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()
And you get:
Run it:
SELECT r()
And you get:
NOTICE: Break the 1st
line...NOTICE: eol on 2nd line...NOTICE: 3rd line
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | sabin(dot)coanda(at)deuromedia(dot)ro |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4536: raise doesn't add end of line |
Date: | 2008-11-17 19:56:21 |
Message-ID: | 20081117195621.GM4291@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
sabin(dot)coanda(at)deuromedia(dot)ro wrote:
> And you get:
>
> NOTICE: Break the 1st
> line...NOTICE: eol on 2nd line...NOTICE: 3rd line
It works for me, both on 8.3 and current 8.4devel:
alvherre=# select r();
NOTICE: Break the 1st
line...
NOTICE: eol on 2nd line...
NOTICE: 3rd line
NOTICE: 4th line
r
---
(1 fila)
How are you running the query?
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4536: raise doesn't add end of line |
Date: | 2008-11-18 10:33:08 |
Message-ID: | gfu5m5amgfu5m5$30am$1@news.hub.org@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
> It works for me, both on 8.3 and current 8.4devel:
> How are you running the query?
You are right. No error occurs on command line.
I have "PostgreSQL 8.3.5, compiled by Visual C++ build 1400", installed on
Windows XP, but I run it from pgAdmin query window, and I read the log
there.
It seems to be a pgAdmin error, not postgres, because in command line it
runs right.
Sorry, and thanks
Sabin