Parsing of backslash in statements via ODBC

From: "aboster" <aboster(at)at-sd(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Parsing of backslash in statements via ODBC
Date: 2005-01-14 19:10:36
Message-ID: 200501141909.j0EJ9JUR012801@mail.at-sd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We are trying to use a suite of third party applications, which run on
Windows 2000, that can make use of a database backend via ODBC. Most of the
apps work just great with Postgres. One of the components (a key
visualization application) does not. Note that this all works fine, as is,
using Oracle or MS-SQL as the backend database.

The vendor was kind enough to provide to us the SQL statements that
application makes (there aren't many) and we were able to identify the
problem by manually tinkering with the data.

A column, called tagname, is a VARCHAR(40) and typical values are:
Foo\Bar
Baz\Blah\You\Get\The\Drift

These values are inserted into the database just fine from other components
on this suite (also via ODBC from a Windows client). When we get rid of any
backslashes in the values, everything works just fine. Unfortunately, this
is not an option.

The statements are:

1) SELECT tn,ti,tt,tdt FROM t WHERE tn = 'mytag01'

2) SELECT dat,mt,ti,val,s,m FROM fl WHERE (ti = @1) AND dat BETWEEN @3 AND
@5 ORDER BY dat DESC, mt DESC

Where @1 is the result of statement (1).

Since MS-SQL & Oracle (both via ODBC) work fine with this app, I would
suspect the issue is that Postgres is interpreting backslashes as escape
characters in situations that the supported databases do not.

Has anyone run across something like this, and if so, can anything be done
given that we don't have the source code of the application in question?

Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-01-14 19:14:06 Re: OID Usage
Previous Message Michael Fuhr 2005-01-14 19:04:55 Re: OID Usage