Re: [HACKERS] (No) Autocast in 8.4 with operators "=" and "LIKE"

2009-07-13 Thread Alvaro Herrera
Daniel Schuchardt wrote:
> Is that is the wished behavoir?
>
> template1=# SELECT 1='1';
> ?column?
> --
> t
> (1 row)

Yes.  See also this:

alvherre=# select 1 = '1'::text;
ERROR:  operator does not exist: integer = text
LÍNEA 1: select 1 = '1'::text;
  ^
SUGERENCIA:  No operator matches the given name and argument type(s). You might 
need to add explicit type casts.

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] (No) Autocast in 8.4 with operators "=" and "LIKE"

2009-07-13 Thread Daniel Schuchardt

Is that is the wished behavoir?

template1=# SELECT 1='1';
?column?
--
t
(1 row)

*template1=# SELECT 1 LIKE '1';
ERROR:  operator does not exist: integer ~~ unknown at character 10*
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.

LINE 1: SELECT 1 LIKE '1';
^
template1=# SELECT version();
  version
-
PostgreSQL 8.4.0, compiled by Visual C++ build 1400, 32-bit
(1 row)


thanks a lot.
--

Daniel Schuchardt
/Softwareentwicklung/

www.prodat-sql.de