Re: Separating raise notice lines

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Radcon Entec <radconentec(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Separating raise notice lines
Date: 2009-06-24 08:15:06
Message-ID: 1E035E19-A992-4A0C-ACE1-558FBCB4F85A@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jun 23, 2009, at 10:27 PM, Radcon Entec wrote:

> raise notice 'User name is % %', userRecord.name, chr(10);

> I am trying to insert a carriage return character (chr(10)) in the
> user name notice so that any subsequent notices will appear on
> separate lines. However, when I use a query to update a field that
> will fire this trigger, the Messages tab contains this:
>
> NOTICE: User name is capsNOTICE: History record should be added

As you're apparently using a Windows client you probably need to print
\r\n (characters 13 and 10) instead of just \n to make your client
understand the newline. The fault is in the client though, so maybe
you don't want to handle that on the server-side.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.

!DSPAM:737,4a41e08a759153794312201!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2009-06-24 08:55:11 Re: [BUGS] Integrity check
Previous Message Dimitri Fontaine 2009-06-24 07:53:59 Re: Replication