X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 15E679DC886 for ; Sun, 12 Feb 2006 11:53:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35226-01 for ; Sun, 12 Feb 2006 11:53:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id A6CF79DC839 for ; Sun, 12 Feb 2006 11:53:14 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k1CFr6GS054113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 12 Feb 2006 08:53:09 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k1CFr5RE073358; Sun, 12 Feb 2006 08:53:05 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k1CFr3iV073284; Sun, 12 Feb 2006 08:53:03 -0700 (MST) (envelope-from mfuhr) Date: Sun, 12 Feb 2006 08:53:03 -0700 From: Michael Fuhr To: Mariano Reingart Cc: pgsql-interfaces@postgresql.org Subject: Re: LibPqEasy, binary cursor, x86-64, fetch(int4) problem? Message-ID: <20060212155303.GA68917@winnie.fuhr.org> References: <000301c62f62$dbd72b90$0300000a@PC1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000301c62f62$dbd72b90$0300000a@PC1> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200602/40 X-Sequence-Number: 6004 On Sat, Feb 11, 2006 at 08:28:25PM -0300, Mariano Reingart wrote: > Hi, I recently moved a simple application from a 32bit Intel to a new AMD64 > server (migrated from Postgres 7.2 to 8.1.2 and LibPqEasy 3.0.4), running > Slamd64 (Slackware port to the AMD64). Everything compiled just fine but > the applicattion didn't work as expected. > When I look into the tables (with psql) I see strange values in int4 > columns like ( 16777216, 402653184, 1124073472, ...) instead of normal ones > (1, 24, 67) Convert the numbers to hex and they don't look so strange: 1 = 0x01 24 = 0x18 67 = 0x43 16777216 = 0x01000000 402653184 = 0x18000000 1124073472 = 0x43000000 That ought to hint at what's happening. -- Michael Fuhr