Re: Escaping \n

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Escaping \n
Дата
Msg-id 20080328214926.GD6870@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: Escaping \n  (Terry Lee Tucker <terry@chosen-ones.org>)
Список pgsql-general
On Fri, Mar 28, 2008 at 05:29:06PM -0400, Terry Lee Tucker wrote:
> Thanks Sam. No, that is not what I tried. I had tried:
> UPDATE bill SET notes = 'blah, blah, yeaE'\n'more stuff.'
> It didn't dawn on me that the E went in front of the whole string!

it's always easy when you know how!

> Thanks for the help...

No probs.

PG 8.3 is also more strict with its automatic casts and you may have
fun there as well.  In previous versions, it would be reasonably happy
to (silently) convert lots of datatypes to text.  This was generally
useful, but occasionally led to bad things happening.  Most times I've
seen people affected by this is with dates---i.e. to get the year some
people did substr(datecol,1,4).  In this case you should really be doing
extract(year from datecol) because the year doesn't always have to be in
the first four digits it just tends to be in the common setups.


  Sam

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

Предыдущее
От: Terry Lee Tucker
Дата:
Сообщение: Re: Escaping \n
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Out of memory