Re: Wi e kann man newlines in die Ausgabe einfügen

Thomas Wallrafen <[email protected]>
Newsgroups gmane.comp.db.postgresql.german
Message-ID <20120504202700.GA27261@vps-hzn-02>
Hallo,

On Fri, May 04, 2012 at 10:09:48PM +0200, Andreas Tille wrote:
> Hallo,
> 
> ich habe ein
> 
> # SELECT 'a' || '\n' || 'b' AS test;
>  test 
> ------
>  a\nb
> 
> versucht, um zwischen die beiden Werte ein Newline einzufügen was
> offensichtlich nicht funktioniert.  Wie macht man das richtig?

versuche doch mal ein

SELECT cast( 'a' || E'\n' || 'b' as text );

Zumindest für Postgres 8.4 funktioniert das.


Bye,

Thomas

-- 
Sent via pgsql-de-allgemein mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.