Re: [SQL] LIKE operator and string comparison

2004-09-22 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > What about in regular strings? I do need to use backslash to escape the > other backslash in order to get the '\'. Why isn't that the case in LIKE > operation? It is. You write four backslashes in order to describe a string constant value containing two ba

Re: [SQL] LIKE operator and string comparison

2004-09-22 Thread Wei Weng
Tom Lane wrote: Wei Weng <[EMAIL PROTECTED]> writes: But if I choose to use string comparison, instead of 4 escape characters, I only need 2. Why is that? Backslash is an escape character for LIKE. regards, tom lane What about in regular strings? I do need to use backsla

Re: [SQL] LIKE operator and string comparison

2004-09-22 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > But if I choose to use string comparison, instead of 4 escape characters, I > only need 2. > Why is that? Backslash is an escape character for LIKE. regards, tom lane ---(end of broadcast)---

[SQL] LIKE operator and string comparison

2004-09-22 Thread Wei Weng
I used the following SQL code to match '\foo\bar' SELECT text FROM test WHERE text LIKE 'foo%' But if I choose to use string comparison, instead of 4 escape characters, I only need 2. SELECT text FROM test WHERE text = '\\foo\\bar' Why is that? I am using PostgreSQL 7.4, and the SQL code

Re: [SQL] Porting problem from Informix to Postgres...

2004-09-22 Thread Josh Berkus
Marco, > Centura uses Informix via a native driver, for postgres we pass along > odbc. Our postgres environment are a set of intel box, loaded with > debian woody, so postgres 7.2.1. You do realize that this is a 2-year-old version of Postgresql, yes? It seems to me that if you're going to take

Re: [SQL] Porting problem from Informix to Postgres...

2004-09-22 Thread Achilleus Mantzios
O Marco Gaiarin έγραψε στις Sep 22, 2004 : > > On our organization we are porting an old, internally developed app, > that use Informix (SE 7.XX, on a sun box) as database backend and Gupta > Centura Team Developer 1.5.1 as development environment. > > Centura uses Informix via a native driver,

Re: [SQL] Porting problem from Informix to Postgres...

2004-09-22 Thread Michalis Kabrianis
Marco Gaiarin wrote: On our organization we are porting an old, internally developed app, that use Informix (SE 7.XX, on a sun box) as database backend and Gupta Centura Team Developer 1.5.1 as development environment. Centura uses Informix via a native driver, for postgres we pass along odbc. Our

[SQL] Porting problem from Informix to Postgres...

2004-09-22 Thread Marco Gaiarin
On our organization we are porting an old, internally developed app, that use Informix (SE 7.XX, on a sun box) as database backend and Gupta Centura Team Developer 1.5.1 as development environment. Centura uses Informix via a native driver, for postgres we pass along odbc. Our postgres environmen