On Mon, Nov 12, 2007 at 05:18:28PM -0500, Tom Lane wrote:
> regression=# select '00123'::text like '0%';
> ?column?
> ----------
> t
> (1 row)
> regression=# select '00123'::int4 like '0%';
> ?column?
> ----------
> f
> (1 row)
i think it's definitelly ok - '00123'::text is *not equal* to
'00123'::int4. so result of "like'ing" it is not necessarily the same.
what's more - in case patric showed - when he had int column there was
no "danger" of '00123'::int4.
best regards,
depesz
--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)