Re: using CAST and LIKE - Mailing list pgsql-general

From Tom Lane
Subject Re: using CAST and LIKE
Date
Msg-id 25925.1018899988@sss.pgh.pa.us
Whole thread Raw
In response to using CAST and LIKE  (Timothy Wood <timothy@hallcomp.com>)
Responses Re: using CAST and LIKE  (Timothy Wood <timothy@hallcomp.com>)
List pgsql-general
Timothy Wood <timothy@hallcomp.com> writes:
> SELECT * FROM table WHERE CAST('field' AS TEXT) LIKE '%value%';

I think you meant

SELECT * FROM table WHERE CAST(field AS TEXT) LIKE '%value%';

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How to Recompile Postgreqsl to increase Function-argument
Next
From: Dmitry Tkach
Date:
Subject: Re: Alter/update large tables - VERRRY annoying behaviour!