Re: Bug involving plus sign before newline in text field being duplicated or stripped

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug involving plus sign before newline in text field being duplicated or stripped
Дата
Msg-id 9347.1552411104@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug involving plus sign before newline in text field being duplicatedor stripped  (Jon Wedell <wedell@bmrb.wisc.edu>)
Список pgsql-bugs
Jon Wedell <wedell@bmrb.wisc.edu> writes:
> postgres=# create table test (inchi text);
> CREATE TABLE
> postgres=# insert into test values ('test+
> postgres'# ');
> INSERT 0 1
> postgres=# select * from test;
>  inchi
> -------
>  test++
>  
> (1 row)

Well, that one is not a bug.  The character value you inserted is
"t e s t + newline", and when psql renders a value including a
newline, by default it puts a plus at the end of the preceding line.
You can alter that behavior with psql's various \pset options, I believe.

> The second bug is that pyscopg2-binary is stripping a plus sign at the
> end of the value out.

I don't use pyscopg2, but I suspect that you're confusing
the decorative "+" shown by psql with actual data.

            regards, tom lane


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Bug involving plus sign before newline in text field beingduplicated or stripped
Следующее
От: Jon Wedell
Дата:
Сообщение: Re: Bug involving plus sign before newline in text field beingduplicated or stripped