From: Michael Fuhr <mfuhr+pgsql-php@fuhr.org>
To: Seader, Cameron <CSeader@idahopower.com>
Cc: pgsql-php@postgresql.org
Subject: Re: PostgreSQL and Bitwise and with int8 field
Date: Sat, 20 Dec 2003 18:52:49 -0700
Message-ID: <20031220185249.A12953@quality.qadas.com> (raw)
In-Reply-To: <71B8A8BEC516CF46835CA629156CF211103813@bedford.idacorp.local>
References: <71B8A8BEC516CF46835CA629156CF211103813@bedford.idacorp.local>
On Sat, Dec 20, 2003 at 02:44:31PM -0700, Seader, Cameron wrote:
> I am trying to get the proper output with this SQL statement:
>
> SELECT *, (highalarm & 0xffffffff)as high1, (highalarm >> 32)as high2 FROM t444d500009b5_2_6 ORDER BY utctime DESC LIMIT 1
Try this:
SELECT *, (highalarm & x'ffffffff'::int8) AS high1, (highalarm >> 32) AS high2
FROM t444d500009b5_2_6
ORDER BY utctime DESC
LIMIT 1
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: mfuhr+pgsql-php@fuhr.org, CSeader@idahopower.com
Subject: Re: PostgreSQL and Bitwise and with int8 field
In-Reply-To: <20031220185249.A12953@quality.qadas.com>
References: <71B8A8BEC516CF46835CA629156CF211103813@bedford.idacorp.local> <20031220185249.A12953@quality.qadas.com>
* 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