Re: version() output vs. 32/64 bits

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: version() output vs. 32/64 bits
Date: 2008-12-31 11:51:44
Message-ID: 200812311351.45057.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 31 December 2008 04:45:01 Bruce Momjian wrote:
> Tom Lane wrote:
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > > ... Moreover, there does not actually seem to be a
> > > way to find out whether you have a 32-bit or a 64-bit build (except by
> > > using OS tools).
> >
> > I think the basic definition of "32 bit" or "64 bit", certainly for
> > our purposes, is sizeof(void *). That is something that configure
> > could easily find out. Or you could look at sizeof(size_t) which
> > it already does find out.
> >
> > I have no immediate proposal on how to factor that into the version
> > string.
>
> I think the pointer size is part of the compiler, rather than the
> platform, so it should go after the compiler mention, e.g.:

I'm not really sure about that.

> test=> select version();
> version
>
> --------------------------------------------------------------------------
>
> PostgreSQL 8.4devel on i386-pc-bsdi4.3.1, compiled by GCC 2.95.3, 32-bit
> (1 row)

Maybe we should separate all that, e.g.,

SELECT version(); => 'PostgreSQL 8.4devel'
SELECT pg_host_os(); => 'bsdi4.3.1'
SELECT pg_host_cpu(); => 'i386' (although this is still faulty, as per my
original argument; needs some thought)
SELECT pg_compiler(); => 'GCC 2.95.3'
SELECT pg_pointer_size(); => 4 (or 32) (this could also be a SHOW variable)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-12-31 12:00:55 Re: pg_pltemplate entries for external PLs
Previous Message Heikki Linnakangas 2008-12-31 11:21:19 Re: TODO items for window functions