psqlodbc

From: "Jose' Soares" <jose(at)sferacarta(dot)com>
To: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Cc: sferac(at)bo(dot)nettuno(dot)it
Subject: psqlodbc
Date: 1998-11-25 09:30:01
Message-ID: 365BCE19.52AE4AE8@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi all,

I have a problem with psqlodbc using M$access.
I created a query on M$access, with the following:

SELECT esito1, esito2
FROM brogliacci
WHERE esito1 IS NOT NULL OR esito2 IS NOT NULL;

When I tred to execute the query I had an
ODBC call failed message and then the connection was down.

Here an extract of psqlodbc.log file:

<DELETED>
---------------- Socket Info -------------------------------
socket=53, reverse=0, errornumber=0, errormsg='(null)'
buffer_in=55122188, buffer_out=55126288
buffer_filled_in=42, buffer_filled_out=0, buffer_read_in=42
conn=55115896, query='SELECT "brogliacci"."esito1","brogliacci"."esito2"
FROM "brogliacci" WHERE (NOT(("esito1" IS NULL ) ) OR NOT(("esito2" IS
NULL ) ) ) '
STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while
executing the query'

------------------------------------------------------------
hdbc=55115896, stmt=55130388, result=0
<DELETED>

I see that psqlodbc translate the query as:

SELECT "brogliacci"."esito1","brogliacci"."esito2"
FROM "brogliacci"
WHERE (NOT(("esito1" IS NULL ) ) OR NOT(("esito2" IS NULL ) ) )

I don't know if this syntax is standard but anyway PostgreSQL understand
this syntax
except when the sentence contains the OR operator.

EXAMPLES:

SELECT esito1, esito2 FROM brogliacci
WHERE esito1 Is Not Null OR esito2 Is Not Null;
esito1|esito2
------+------
(0 rows)

SELECT "brogliacci"."esito1","brogliacci"."esito2" FROM "brogliacci"
WHERE (NOT(("esito1" IS NULL ) ) );
esito1|esito2
------+------
(0 rows)

SELECT "brogliacci"."esito1","brogliacci"."esito2" FROM "brogliacci"
WHERE (NOT(("esito1" IS NULL ) ) AND NOT(("esito2" IS NULL ) ) );
esito1|esito2
------+------
(0 rows)

SELECT "brogliacci"."esito1","brogliacci"."esito2" FROM "brogliacci"
WHERE (NOT(("esito1" IS NULL ) ) OR NOT(("esito2" IS NULL ) ) );
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally before or
while pr
ocessing the request.
We have lost the connection to the backend, so further processing is
impossible.
Terminating.

Should it be considered a bug ?

Please replay to sferac(at)bo(dot)nettuno(dot)it because I have problems with
jose(at)sferacarta(dot)com, Thanks
-Jose'-

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-11-25 14:27:13 Re: [INTERFACES] psqlodbc
Previous Message Samuel Kobelkowsky 1998-11-25 04:54:24 Re: Right interface