Re: Double newline bug with DBD::Pg: Where best to fix?
От | Tom Lane |
---|---|
Тема | Re: Double newline bug with DBD::Pg: Where best to fix? |
Дата | |
Msg-id | 9388.983305623@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Double newline bug with DBD::Pg: Where best to fix? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Double newline bug with DBD::Pg: Where best to fix?
Re: Double newline bug with DBD::Pg: Where best to fix? |
Список | pgsql-interfaces |
>> test=# insert into xyz(stuff) values('a string with >> test'# >> test'# a two line break'); >> test=# select stuff from xyz; >> stuff >> ---------------------------------- >> a string with >> a two line break >> (1 row) >> (As you can see there are also some interesting issues with leading >> spaces going on here). On closer look, there is no leading-space issue. Psql is formatting the column with a leading space as it usually does, and the newline-space in the string is just being echoed. Compare: regression=# select 'a string without a newline'; ?column? ----------------------------a string without a newline (1 row) regression=# select 'a string\nwith a newline'; ?column? -------------------------a string with a newline (1 row) regression=# select 'a string\n with a newline'; ?column? --------------------------a stringwith a newline (1 row) regression=# select 'a string regression'# with a newline'; ?column? -------------------------a string with a newline (1 row) regression=# select 'a string regression'# with a newline'; ?column? --------------------------a stringwith a newline (1 row) That's all fine IMHO. But this isn't: regression=# select 'a string regression'# regression'# with a newline'; ?column? -------------------------a string with a newline (1 row) regards, tom lane
В списке pgsql-interfaces по дате отправления: