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

Re: [Q] specifying bigint

From: "V S P" <toreason(at)fastmail(dot)fm>
To: "Hiroshi Inoue" <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [Q] specifying bigint
Date: 2009-03-29 02:32:38
Message-ID: 1238293958.9911.1307825351@webmail.messagingengine.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi,
thank you
that worked 


I kind of do not understand still why there is a conversion
to string -- is this 'expected behavior' 
(so that at least I would know in the future it applies to somewhere
else)


Also wanted to ask

is SQLRowCount() function working for
updates and inserts?


thank you in advance,
Vlad




On Sat, 28 Mar 2009 20:26 +0900, "Hiroshi Inoue" <inoue(at)tpf(dot)co(dot)jp>
wrote:
> V S P wrote:
> > HI,
> > I did some more tracing, and it looks like the data is sent to ODBC
> > correctly  (bigint, char, bigint)
> > and it is somewhere within ODBC driver or after, bigints are converted
> > to strings
> > Wanted to ask if there is may be a workaround of some sort to keep
> > bigints
> > as number not strings 
> > 
> > 
> > here is the ODBC trace of the offending update (Ascii driver on windows)
> > the bigint appear to be 'announced' as bigints 
> > (prb_bigint is my program name)
> > 
> > The error indicates, however that somewhere bigint is converted to a
> > string
> > in 'f3=t.f3"
> > 
> > 	DIAG [42883] ERROR: operator does not exist: bigint = text;
> > Error while executing the query (7) 
> > 
> > 
> > ------------------------
> > prb_bigint      d98-110 ENTER SQLPrepare 
> > 		HSTMT               00921C28
> > 		UCHAR *             0x009078F0 [      -3] "UPDATE test_tab SET f2= t.f2,f3=t.f3 from(VALUES( ?          , ?            , ?          ))as t(f1,f2,f3) WHERE test_tab.f1=t.f1\ 0"
> > 		SDWORD                    -3
> 
> How about
>    UPDATE test_tab SET f2=t.f2, f3=t.f3 from (VALUES (?::bigint, ?,
>    ?::bigint)) as t(f1,f2,f3) WHERE test_tab.f1=t.f1
> ?
> 
> regards,
> Hiroshi Inoue
-- 
  V S P
  toreason(at)fastmail(dot)fm

-- 
http://www.fastmail.fm - IMAP accessible web-mail


In response to

Responses

pgsql-odbc by date

Next:From: Hiroshi SaitoDate: 2009-03-29 13:28:58
Subject: Re: Release plan
Previous:From: Johann ZuschlagDate: 2009-03-28 14:04:34
Subject: Re: Release plan

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