X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A2F5311F64E0 for ; Tue, 4 Apr 2006 07:52:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72337-04 for ; Tue, 4 Apr 2006 07:52:31 -0300 (ADT) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id C4BB811F6276 for ; Tue, 4 Apr 2006 07:52:29 -0300 (ADT) Received: from localhost (av.hub.org [200.46.204.144]) by pgfoundry.org (Postfix) with ESMTP id B0B531033855; Tue, 4 Apr 2006 10:52:30 +0000 (GMT) Received: from pgfoundry.org ([200.46.204.130]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64343-07; Tue, 4 Apr 2006 07:52:29 -0300 (ADT) Received: by pgfoundry.org (Postfix, from userid 80) id B2A62103383D; Tue, 4 Apr 2006 10:52:28 +0000 (GMT) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1000605 ] Escaped single-quotes mistreated by PGAPI_NumParams Content-type: text/plain; charset=UTF-8 Message-Id: <20060404105228.B2A62103383D@pgfoundry.org> Date: Tue, 4 Apr 2006 10:52:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-0.707 required=5 tests=[ALL_TRUSTED=-1.44, AWL=0.183, NO_REAL_NAME=0.55] X-Spam-Score: -0.707 X-Spam-Level: X-Archive-Number: 200604/18 X-Sequence-Number: 7545 Bugs item #1000605, was opened at 2006-04-04 13:52 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000605&group_id=1000125 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Lasse Haataja (lhaataja) Assigned to: Nobody (None) Summary: Escaped single-quotes mistreated by PGAPI_NumParams Initial Comment: Note: The error seems to only occur with 8.01.0200, although the actual code in PGAPI_NumParams is identical in earlier versions; probably called with different args in .0200. The body of PGAPI_NumParams seems to fail to take into account single quotes escaped by backslashes, instead treating them in the same manner as literal single quotes, causing queries containing escaped single quotes and question marks in correct sequence (such as SELECT '\'?') to fail with the error "The # of binded parameters < the # of parameter markers". This can luckily be worked around (in a standard-compliant manner, no less) by escaping single quotes with a single quote instead of a backslash, but a fix, at least in the documentation, would be welcome. To reproduce, do a SELECT '\'?' via psqlodbc 8.01.0200. ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000605&group_id=1000125