Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-18 Thread Daniel Neugebauer
On 02/19/2012 12:05 AM, Susanne Ebrecht wrote: > Am 17.02.2012 17:24, schrieb Alban Hertroys: >> On 17 February 2012 17:19, Scott Marlowe >>> Have you tried casting to varchar(1000) or something like that? >> Don't MySQL's varchars only go to 255? That's why every MySQL database >> uses blobs for t

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-18 Thread Susanne Ebrecht
Am 17.02.2012 17:24, schrieb Alban Hertroys: On 17 February 2012 17:19, Scott Marlowe Have you tried casting to varchar(1000) or something like that? Don't MySQL's varchars only go to 255? That's why every MySQL database uses blobs for text data, isn't it? Yes. -- Dipl. Inf. Susanne Ebrecht

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-18 Thread premanand
Hi Marti, Thanks for your reply. It works as expected. Regards, Prem -- View this message in context: http://postgresql.1045698.n5.nabble.com/MySQL-search-query-is-not-executing-in-Postgres-DB-tp5492402p5494971.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Se

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Adrian Klaver
On 02/17/2012 08:01 AM, Marti Raudsepp wrote: On Fri, Feb 17, 2012 at 17:13, Adrian Klaver wrote: Why not use: " SELECT * FROM WHERE CAST(Table.ID as TEXT) LIKE '1%' " as the MySQL query also? MySQL supports the CAST function. Nope, trying to use CAST() in an interoperable manner is a lost

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Scott Marlowe
On Fri, Feb 17, 2012 at 9:22 AM, Marti Raudsepp wrote: > On Fri, Feb 17, 2012 at 18:19, Scott Marlowe wrote: >> Have you tried casting to varchar(1000) or something like that? > > MySQL's CAST() doesn't accept varchar or varchar(N). It accepts char, > which behaves like varchar. It's a shame you

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Alban Hertroys
On 17 February 2012 17:19, Scott Marlowe > Have you tried casting to varchar(1000) or something like that? Don't MySQL's varchars only go to 255? That's why every MySQL database uses blobs for text data, isn't it? -- If you can't see the forest for the trees, Cut the trees and you'll see there i

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Marti Raudsepp
On Fri, Feb 17, 2012 at 18:19, Scott Marlowe wrote: > Have you tried casting to varchar(1000) or something like that? MySQL's CAST() doesn't accept varchar or varchar(N). It accepts char, which behaves like varchar. Regards, Marti -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Scott Marlowe
On Fri, Feb 17, 2012 at 9:01 AM, Marti Raudsepp wrote: > On Fri, Feb 17, 2012 at 17:13, Adrian Klaver wrote: >> Why not use: >> " SELECT * FROM WHERE CAST(Table.ID as TEXT) LIKE '1%' " >> >> as the MySQL query also?  MySQL supports the CAST function. > > Nope, trying to use CAST() in an interope

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Marti Raudsepp
On Fri, Feb 17, 2012 at 17:13, Adrian Klaver wrote: > Why not use: > " SELECT * FROM WHERE CAST(Table.ID as TEXT) LIKE '1%' " > > as the MySQL query also?  MySQL supports the CAST function. Nope, trying to use CAST() in an interoperable manner is a lost cause. Sadly MySQL and PostgreSQL don't ag

Re: [GENERAL] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Adrian Klaver
On Friday, February 17, 2012 5:01:47 am premanand wrote: > In MySQL the below query is executing properly. > > SELECT * FROM WHERE (Table.ID LIKE '1%') > > But when i try to execute the above query in Postgres, i get the following > Exception "org.postgresql.util.PSQLException: ERROR: operator d