View Single Post

   
  #20 (permalink)  
Old 05-07-2008, 11:16 AM
Martijn van Oosterhout
 
Posts: n/a
Default Re: now i'm really confused. insert/update does autocast, where sometimes.

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.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIID4OIB7bNG8LQkwRAk7DAJ9fj2Q5nKQ0sW/iShJCcjjsBccWtQCeMhuD
ms070/QcX3lZFYWexYhycwc=
=Cy2q
-----END PGP SIGNATURE-----

Reply With Quote