Re: Transforming IN (...) to ORs, volatility - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Transforming IN (...) to ORs, volatility
Date
Msg-id 4970.1302539702@sss.pgh.pa.us
Whole thread Raw
In response to Re: Transforming IN (...) to ORs, volatility  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Does anyone object to making BETWEEN and IN more strict about the data 
> types? At the moment, you can do this:

> postgres=# SELECT '1234' BETWEEN '10001'::text AND 10002::int4;
>   ?column?
> ----------
>   t
> (1 row)

> I'm thinking that it should throw an error. Same with IN, if the values 
> in the IN-list can't be coerced to a common type.

You *will* get push-back on that ... maybe from people with badly coded
applications, but I guarantee there will be complaints.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: pgfoundry down?
Next
From: Noah Misch
Date:
Subject: Re: switch UNLOGGED to LOGGED