pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Mariano Reingart <mariano@nsis.com.ar>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: LibPqEasy, binary cursor, x86-64, fetch(int4) problem?
Date: Sun, 12 Feb 2006 08:53:03 -0700
Message-ID: <20060212155303.GA68917@winnie.fuhr.org> (raw)
In-Reply-To: <000301c62f62$dbd72b90$0300000a@PC1>
References: <000301c62f62$dbd72b90$0300000a@PC1>

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



view thread (3+ messages)  latest in thread

Message-ID: <20060212155303.GA68917@winnie.fuhr.org>
Permalink:  ../20060212155303.GA68917@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060212155303.GA68917@winnie.fuhr.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mike@fuhr.org, mariano@nsis.com.ar
  Subject: Re: LibPqEasy, binary cursor, x86-64, fetch(int4) problem?
  In-Reply-To: <20060212155303.GA68917@winnie.fuhr.org>

* 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