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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: now i'm really confused. insert/update does autocast, where sometimes.
Date: 2008-05-06 11:16:30
Message-ID: 20080506111630.GE19090@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Schuchardt 2008-05-06 12:09:30 Autocast script of peter e in PostgreSQL 8.3
Previous Message Daniel Schuchardt 2008-05-06 09:56:17 Re: now i'm really confused. insert/update does autocast, where sometimes.