Re: multi line text data/query ?bug? - Mailing list pgsql-general

From Tom Lane
Subject Re: multi line text data/query ?bug?
Date
Msg-id 26478.1111675619@sss.pgh.pa.us
Whole thread Raw
In response to Re: multi line text data/query ?bug?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> IMHO, if you're trying to write portably, don't just hit enter when you
> want an end of line, use \n or \r to indicate *exactly* what you mean.

Indeed.  We are already permissive about line endings in SQL text, so
this discussion really boils down only to whether we should reinterpret
data that's inside a string literal.  There are good style reasons why
you should never put an unescaped newline into a string literal in the
first place ... and if you do, I don't think it's the database's job to
second-guess what you meant.

            regards, tom lane

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Good Books
Next
From: Bill Moran
Date:
Subject: Questions regarding interaction of stored functions and transactions