X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 01244D1B903 for ; Sun, 14 Mar 2004 18:30:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 34850-02 for ; Sun, 14 Mar 2004 14:30:46 -0400 (AST) Received: from gpdnet.co.uk (gpdnet.plus.com [212.56.100.243]) by svr1.postgresql.org (Postfix) with ESMTP id AEAE9D1D2DC for ; Sun, 14 Mar 2004 14:30:39 -0400 (AST) Received: from Spooler by gpdnet.co.uk (Mercury/32 v4.01a) ID MO000E52; 14 Mar 2004 18:33:07 -0000 Received: from spooler by gpdnet.co.uk (Mercury/32 v4.01a); 14 Mar 2004 18:32:59 -0000 Received: from gary (192.168.1.2) by gpdnet.co.uk (Mercury/32 v4.01a) with ESMTP ID MG000E51; 14 Mar 2004 18:32:53 -0000 From: "Gary Doades" To: pgsql-odbc@postgresql.org Date: Sun, 14 Mar 2004 18:32:53 -0000 MIME-Version: 1.0 Subject: Re: ODBC int2 parameters to pg function Message-ID: <4054A555.1760.4D76A1B@localhost> In-reply-to: <23591.1079288691@sss.pgh.pa.us> References: <4054A1FF.5016.4CA631D@localhost> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/55 X-Sequence-Number: 3857 Thanks Tom, I did actually put the parameter binding examples in my original post, but as they are in .NET speak it may not have been obvious. I guess I should try to get this on the "things to do with the ODBC" driver list. I should be able to look at the code myself, but I will have to remember how to speak C. Thanks again, Gary. On 14 Mar 2004 at 13:24, Tom Lane wrote: > "Gary Doades" writes: > > AFAICS it is only int2 types that are not typecast. All other > > datatypes (except string and int4 which don't need it) are typecast > > explicitly by the driver before being passed to the server. > > I see. AFAIR you hadn't mentioned that you were declaring the parameter > as smallint to ODBC. I tend to agree that a cast should be added in > that case. It's not my code though ... > > regards, tom lane