pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jose' Soares <jose@sferacarta.com>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Cc: sferac@bo.nettuno.it
Subject: psqlodbc
Date: Wed, 25 Nov 1998 10:30:01 +0100
Message-ID: <365BCE19.52AE4AE8@sferacarta.com> (raw)

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@bo.nettuno.it because I have problems with
jose@sferacarta.com, Thanks
-Jose'-



view thread (16+ messages)  latest in thread

Message-ID: <365BCE19.52AE4AE8@sferacarta.com>
Permalink:  ../365BCE19.52AE4AE8@sferacarta.com/
Also on:    postgresql.org/message-id/365BCE19.52AE4AE8@sferacarta.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jose@sferacarta.com, sferac@bo.nettuno.it
  Subject: Re: psqlodbc
  In-Reply-To: <365BCE19.52AE4AE8@sferacarta.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox