Skip site navigation (1) Skip section navigation (2)

BUG #3951: SELECT ... WHERE Param = ? does not work if Param is of type bytea

From: "vha" <vincent_dhaene(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3951: SELECT ... WHERE Param = ? does not work if Param is of type bytea
Date: 2008-02-10 18:55:18
Message-ID: 200802101855.m1AItI34085841@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3951
Logged by:          vha
Email address:      vincent_dhaene(at)hotmail(dot)com
PostgreSQL version: 8.3
Operating system:   Windows XP SP2
Description:        SELECT ... WHERE Param = ? does not work if Param is of
type bytea
Details: 

I have a table with one of the columns of type BYTEA containing GUIDs (16
bytes of data).

The data of the column is specified using SQLBindParameter(hstmt, nCol,
SQL_PARAM_INPUT, SQL_C_BINARY, SQL_BINARY, 16, 0, theGUID, 16, &ptr).

This works fine to insert the data using "INSERT ... VALUES ?", but
retrieving the data using "SELECT ... WHERE Param = ?" doesn't work: nothing
is returned.

Am I doing something wrong or is this a bug?

BTW. This code works without any problem on MS SQL 2000, MS SQL 2005, Oracle
and MySQL.


vha

Responses

pgsql-bugs by date

Next:From: Tomas SzepeDate: 2008-02-10 18:56:45
Subject: Re: 8.3.0: vacuum full analyze: "invalid memory alloc request size"
Previous:From: Tom LaneDate: 2008-02-10 18:34:48
Subject: Re: 8.3.0: vacuum full analyze: "invalid memory alloc request size"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group