Re: [SQL] raise doesn't add end of line

2008-11-17 Thread Sabin Coanda
Also I found all the characters E'\n' in a raise are filtered and not 
logged.
I don't beleave no one knows how to log the end of line, maybe by a related 
configuration setting.

Please help, or at least confirm there is a bug, to not waste time looking 
for workarounds. I'm disperate all my usefull multiline logs are now useless 
:(

TIA,
Sabin 



-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] raise doesn't add end of line

2008-11-17 Thread Pavel Stehule
Hello

it's true, and I thing, so it is a bug (please, report it). Workaround
is simple. Use function chr.

regards
Pavel Stehule

postgres=# create or replace function r() returns void as $$begin
raise notice 'aa%naata%aa', chr(10),chr(10); end; $$ language plpgsql;
CREATE FUNCTION
postgres=# select r();
NOTICE:  aa
naata
aa
 r
---

(1 row)



2008/11/17 Sabin Coanda <[EMAIL PROTECTED]>:
> Also I found all the characters E'\n' in a raise are filtered and not
> logged.
> I don't beleave no one knows how to log the end of line, maybe by a related
> configuration setting.
>
> Please help, or at least confirm there is a bug, to not waste time looking
> for workarounds. I'm disperate all my usefull multiline logs are now useless
> :(
>
> TIA,
> Sabin
>
>
>
> --
> Sent via pgsql-sql mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] raise doesn't add end of line

2008-11-17 Thread Sabin Coanda
Hi Pavel,

I tried on Windows, and it works. Thanks a lot.

BTW, I didn't succeed to find char(10) workaround because I tried at the end 
of the line, where ... it doesn't work.

For instance check the function:

-- Function: r()

-- DROP FUNCTION r();

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';
end; $BODY$
  LANGUAGE 'plpgsql' VOLATILE
  COST 100;
ALTER FUNCTION r() OWNER TO postgres;


Run it:
SELECT r()

And you get:

NOTICE:  Break the 1st
line...NOTICE:  eol on 2nd line...NOTICE:  3rd line




-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql