From: Ludek Finstrle <luf@pzkagis.cz>
To: A.j. Langereis <a.j.langereis@inter.nl.net>
Cc: pgsql-odbc@postgresql.org
Subject: patch: Re: Values in the select
Date: Sat, 14 Jan 2006 00:10:05 +0100
Message-ID: <20060113231005.GA17850@soptik.pzkagis.cz> (raw)
In-Reply-To: <20060112143055.GF7886@soptik.pzkagis.cz>
References: <001401c60749$bd1ab910$6500a8c0@aarjan2>
<20060112143055.GF7886@soptik.pzkagis.cz>
> > I have written an application that uses Postgresql (8.1.0) trough
> > an ODBC (ANSI) connection. I noticed that a query like
> > "select 'bar' as foo" does not give the value "bar" in the column
> > "foo". This works normally under PGadmin and even on other databases
> > via ODBC. Am I overlooking something or might this be a bug?
>
> I'm able to reproduce the problem here. Stay tuned. I hope I'll fix it
> in 08.01.0107 development snapshot.
I has good news for you. I found the problem and fix it. psqlODBC
08.01.0107 will contain this patch. I hope I put it on the web
during weekend (the date couldn't be final).
Patch is attached.
Please review and comment
Luf
Attachments:psqlodbc-typlen_var_length.diff (text/plain, 673B) download
diff -c psqlodbc.orig\connection.c psqlodbc\connection.c
*** psqlodbc.orig\connection.c Sun Jan 08 12:12:01 2006
--- psqlodbc\connection.c Sat Jan 14 00:09:10 2006
***************
*** 1959,1965 ****
* (UNKNOWNS_AS_MAX), and UNKNOWNS_AS_LONGEST won't work because we don't
* have data at this point
*/
! if(typlen == -1)
{
switch (ci->drivers.unknown_sizes)
{
--- 1959,1965 ----
* (UNKNOWNS_AS_MAX), and UNKNOWNS_AS_LONGEST won't work because we don't
* have data at this point
*/
! if(typlen < 0)
{
switch (ci->drivers.unknown_sizes)
{
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: luf@pzkagis.cz, a.j.langereis@inter.nl.net
Subject: Re: patch: Re: Values in the select
In-Reply-To: <20060113231005.GA17850@soptik.pzkagis.cz>
References: <001401c60749$bd1ab910$6500a8c0@aarjan2> <20060112143055.GF7886@soptik.pzkagis.cz> <20060113231005.GA17850@soptik.pzkagis.cz>
* 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