Re: Proposal: More portable way to support 64bit platforms

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tsutomu Yamada <tsutomu(at)sraoss(dot)co(dot)jp>
Subject: Re: Proposal: More portable way to support 64bit platforms
Date: 2009-06-29 14:40:08
Message-ID: 200906291740.08294.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday 29 June 2009 17:20:09 Tom Lane wrote:
> The problem with this is that it's barely the tip of the iceberg.
> One point I recall is that there are lots of places where "%lu" is
> assumed to be the correct format to print Datums with.

Hmm. I tried this out. typedef Datum to be long long int on a 32-bit
platform and compile. You get lots of warnings, but none about a format
problem. But if you explicitly insert a call like elog(INFO "datum is %lu",
somedatum), then you see a warning. So this problem might not be very
widespread.

> If it were
> actually possible to support Win64 with only a couple of dozen lines
> of changes, we would have done it long since.

Possibly, or everyone was too confused and didn't know where to start.

I think this proposed change is a step in the right direction, and it doesn't
make things worse for anyone else.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-29 14:52:59 Re: Proposal: More portable way to support 64bit platforms
Previous Message Tom Lane 2009-06-29 14:26:56 Re: [PATCH] user mapping extension to pg_ident.conf