From cgg007@yahoo.com Wed May 9 17:08:39 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A51149FB487 for ; Wed, 9 May 2007 14:08:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 15686-03 for ; Wed, 9 May 2007 14:08:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from web37911.mail.mud.yahoo.com (web37911.mail.mud.yahoo.com [209.191.91.173]) by postgresql.org (Postfix) with SMTP id 692179FA3A7 for ; Wed, 9 May 2007 14:08:35 -0300 (ADT) Received: (qmail 98573 invoked by uid 60001); 9 May 2007 17:08:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=vdsaIjZqS3nn4W6xYHw28F44ChPWcmkiS28U0effG9j2j46UXHl113D7vjfjA5ArmK6RDbXLrRv7V1aOfpyJL9a6LhMkD9uBxa7mGxUIguqwVYr1Hac0oLX/3a+J765/zv+n2Wptk8iFrTSN1fBc3pcA1lBTL5dMr0K7EUGa+vM=; X-YMail-OSG: 2pPotR8VM1lg2anthimSENqEgLFsdBA425mVeQ7qWm3GV1O7wI10SkmEuAP0CFsnCzdV1mxXaQG2AlUFQvy1m9mMEjLYFWk75qidsxMRFW.45CTsuHVycrPlTgtKTA-- Received: from [209.191.119.123] by web37911.mail.mud.yahoo.com via HTTP; Wed, 09 May 2007 10:08:33 PDT X-Mailer: YahooMailRC/478 YahooMailWebService/0.7.41.10 Date: Wed, 9 May 2007 10:08:33 -0700 (PDT) From: CG Reply-To: CG Subject: Value truncation on user defined type To: pgsql-odbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Message-ID: <628526.98267.qm@web37911.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.097 tagged_above=0 required=5 tests=BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, WEIRD_QUOTING=1.341 X-Spam-Level: ** X-Archive-Number: 200705/42 X-Sequence-Number: 8955 I've finally taken the plunge and upgraded PgODBC from 7.03.02.00 to 8.02.04.00 ... I'm having an issue with data truncation on the uniqueidentifier type (http://gborg.postgresql.org/project/uniqueidentifier/projdisplay.php) ... 'in ASP vbScript.... dim conn, sql, rs, newUUID set conn = server.createobject("adodb.connection") conn.open("Provider=MSDASQL.1;Password=pass;Persist Security Info=True;User Id=user;Mode=ReadWrite;" & _ "Extended Properties=""DRIVER={PostgreSQL ANSI};" & _ "DATABASE=data;SERVER=10.0.0.2;PORT=5432;UID=user;PWD=pass;" & _ "SSLmode=disable;ReadOnly=0;Protocol=7.4-1;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;" & _ "ShowSystemTables=0;ConnSettings=set+sort%5Fmem%3D10241%3Bset+geqo%3Don%3B;Fetch=300;Socket=4096;" & _ "UnknownSizes=0;MaxVarcharSize=254;" & _ "MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;" & _ "UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;" & _ "UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=1;" & _ "LowerCaseIdentifier=0;XaOpt=1""") sql = "select newid() as uuid;" set rs = conn.execute(sql) newUUID = rs("uuid").value response.write ("Length : " & len(newUUID) & "
" & vbcrlf) response.write ("Type : " & vartype(newUUID) & "
" & vbcrlf) response.write ("") for i = 1 to len(newUUID) response.write ("" & vbcrlf) next response.write ("
" & asc(mid(newUUID,i,1)) & "" & server.htmlencode(mid(newUUID,i,1)) & "
") rs.close set rs = nothing conn.close set conn = nothing The returned value is the correct length, but there must be a null inserted after the 16th character becasuse the return value, which is a string type, abruptly terminates at that point. If I cast the uuid to type text, nothing gets truncated. This wasn't a problem in 7.03.02.00 ... ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html From inoue@tpf.co.jp Thu May 10 13:50:53 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3364F9FB231 for ; Thu, 10 May 2007 10:50:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 04633-05 for ; Thu, 10 May 2007 10:50:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sd.tpf.co.jp (ftp.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id DBF939FA4F7 for ; Thu, 10 May 2007 10:50:44 -0300 (ADT) Received: (qmail 16201 invoked from network); 10 May 2007 22:50:42 +0900 X-Authentication: inoue was authenticated by smtp.tpf.co.jp at 10 May 2007 22:50:42 +0900 Received: from unknown (HELO ?192.168.11.3?) (219.61.40.6) by smtp.tpf.co.jp with SMTP; 10 May 2007 22:50:42 +0900 Message-ID: <4643232C.4010801@tpf.co.jp> Date: Thu, 10 May 2007 22:50:36 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: CG CC: pgsql-odbc@postgresql.org Subject: Re: Value truncation on user defined type References: <628526.98267.qm@web37911.mail.mud.yahoo.com> In-Reply-To: <628526.98267.qm@web37911.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/43 X-Sequence-Number: 8956 Could you send me directly the Mylog output ? regards, Hiroshi Inoue CG wrote: > I've finally taken the plunge and upgraded PgODBC from 7.03.02.00 to 8.02.04.00 ... I'm having an issue with data truncation on the uniqueidentifier type (http://gborg.postgresql.org/project/uniqueidentifier/projdisplay.php) ... > > > 'in ASP vbScript.... > > dim conn, sql, rs, newUUID > set conn = server.createobject("adodb.connection") > conn.open("Provider=MSDASQL.1;Password=pass;Persist Security Info=True;User Id=user;Mode=ReadWrite;" & _ > "Extended Properties=""DRIVER={PostgreSQL ANSI};" & _ > "DATABASE=data;SERVER=10.0.0.2;PORT=5432;UID=user;PWD=pass;" & _ > "SSLmode=disable;ReadOnly=0;Protocol=7.4-1;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;" & _ > "ShowSystemTables=0;ConnSettings=set+sort%5Fmem%3D10241%3Bset+geqo%3Don%3B;Fetch=300;Socket=4096;" & _ > "UnknownSizes=0;MaxVarcharSize=254;" & _ > "MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;" & _ > "UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;" & _ > "UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=1;" & _ > "LowerCaseIdentifier=0;XaOpt=1""") > > sql = "select newid() as uuid;" > > set rs = conn.execute(sql) > newUUID = rs("uuid").value > > response.write ("Length : " & len(newUUID) & "
" & vbcrlf) > response.write ("Type : " & vartype(newUUID) & "
" & vbcrlf) > response.write ("") > for i = 1 to len(newUUID) > response.write ("" & vbcrlf) > next > response.write ("
" & asc(mid(newUUID,i,1)) & "" & server.htmlencode(mid(newUUID,i,1)) & "
") > > rs.close > set rs = nothing > conn.close > set conn = nothing > > The returned value is the correct length, but there must be a null inserted after the 16th character becasuse the return value, which is a string type, abruptly terminates at that point. > > If I cast the uuid to type text, nothing gets truncated. This wasn't a problem in 7.03.02.00 ... From inoue@tpf.co.jp Fri May 11 03:21:41 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 12CC19FB891 for ; Fri, 11 May 2007 00:21:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 47640-10 for ; Fri, 11 May 2007 00:21:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id A137A9FB4D8 for ; Fri, 11 May 2007 00:21:32 -0300 (ADT) Received: (qmail 27563 invoked from network); 11 May 2007 12:21:29 +0900 Received: from unknown (HELO ?127.0.0.1?) (100.0.32.170) by sd2.tpf-fw-c.co.jp with SMTP; 11 May 2007 12:21:29 +0900 Message-ID: <4643E130.1020707@tpf.co.jp> Date: Fri, 11 May 2007 12:21:20 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: CG CC: pgsql-odbc@postgresql.org Subject: Re: Value truncation on user defined type References: <628526.98267.qm@web37911.mail.mud.yahoo.com> <4643232C.4010801@tpf.co.jp> In-Reply-To: <4643232C.4010801@tpf.co.jp> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.176 tagged_above=0 required=5 tests=AWL=-0.144, BAYES_05=-1.11, RCVD_IN_WHOIS_BOGONS=2.43 X-Spam-Level: * X-Archive-Number: 200705/44 X-Sequence-Number: 8957 I wrote: > Could you send me directly the Mylog output ? I seem to have found the cause. Please try the drivers on testing for 8.2.0402 at http://www.geocities.jp/inocchichichi/psqlodbc/index.html . > CG wrote: >> I've finally taken the plunge and upgraded PgODBC from 7.03.02.00 to 8.02.04.00 ... I'm having an issue with data truncation on the uniqueidentifier type (http://gborg.postgresql.org/project/uniqueidentifier/projdisplay.php) ... >> regards, Hiroshi Inoue