Re: now i'm really confused. insert/update does autocast, where sometimes.

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: now i'm really confused. insert/update does autocast, where sometimes.
Дата
Msg-id 20080506111630.GE19090@svana.org
обсуждение исходный текст
Ответ на now i'm really confused. insert/update does autocast, where sometimes.  (Daniel Schuchardt <daniel_schuchardt@web.de>)
Список pgsql-general
On Tue, May 06, 2008 at 11:31:55AM +0200, Daniel Schuchardt wrote:
> demo=# SELECT * FROM a WHERE b=3||'~1';
> a |  b
> ---+-----
> 5 | 3~1
> 6 | 3~1
> 7 | 3~1
> (3 rows)

The difference is the use of '||' which will autocast *if* one of the
arguments is text.

I was about to ask it you'd actually tested the examples you posted
because they looked like they should work fine.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: Daniel Schuchardt
Дата:
Сообщение: now i'm really confused. insert/update does autocast, where sometimes.
Следующее
От: Daniel Schuchardt
Дата:
Сообщение: Autocast script of peter e in PostgreSQL 8.3