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