From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | John Garrott <johnga(at)primenet(dot)com> |
Cc: | pgsql-ports(at)postgresql(dot)org |
Subject: | Re: [PORTS] Port Bug Report: Insertion of line return character inconsistent. |
Date: | 1999-07-07 23:28:25 |
Message-ID: | 199907072328.TAA13479@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-ports |
> PostgreSQL version : 6.4.2
>
> Compiler used : gcc 2.7.2.3
>
> Hardware:
> ---------
> Linux nadrek 2.0.35 #1 Fri May 21 08:48:00 PDT 1999 i586 unknown
>
>
> Versions of other tools:
> ------------------------
> GNU Make version 3.76.1
> flex version 2.5.4
> GNU Bison version 1.25
>
> --------------------------------------------------------------------------
>
> Problem Description:
> --------------------
> Storing text with included returns seems inconsistent. The return
> character at the end of a text string must be escaped. If the lines
> are double spaced, the next one cannot be or three extra lines are
> generated instead of one.
>
> Example: (Standard C conventions in character representation)
> Intended:
>
> "This is a double spaced comment.
>
> This is the second line."
>
> If inserted as "This is a double spaced comment.\n\nThis is the second line."
> the stored result is
>
> "This is a double spaced comment.
> This is the second line."
>
> If both returns are escaped:
> "This is a double spaced comment.\\\n\\\nThis is the second line."
> the stored result is
>
> "This is a double spaced comment.
>
>
>
> This is the second line."
>
> Finally, if only the first return is escaped, everything is normal:
> "This is a double spaced comment.\\\n\nThis is the second line."
> The stored result is
>
> "This is a double spaced comment.
>
> This is the second line."
I can't reproduce the problem in 6.5:
test=> create table test(x text);
CREATE
test=> insert into test values ('line 1\n\nline2');
INSERT 18985 1
test=> select * from test;
x
-------------
line 1
line2
(1 row)
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-07-07 23:50:39 | Re: [PORTS] Port Bug Report: Wrong binding of arithmetic operator ^. |
Previous Message | Bruce Momjian | 1999-07-07 18:02:54 | Re: [PORTS] Port Bug Report: Unable to insert large strings into a text datatype. |