From: John Guthrie <jguthrie@psynapsetech.net>
To: pgsql-sql@postgresql.org
Subject: upcasting multiplication in a query
Date: Mon, 17 Mar 2003 15:21:29 -0500
Message-ID: <037901c2ecc2$cea38a30$3dc810ac@corphq.psynapsetech.net> (raw)
i have a schema that stores timestamps in seconds/microseconds format. each
column in the table is int4. what i want to do is to compute the int8 value
of total microseconds, a la:
select (seconds*1000000)+micros from my_table;
but it looks to me like postgresql puts the rresult into another int4 (since
i am getting negative numbers, i assume overflow). how can i get it to use
int8?
thanks.
---
john guthrie
jguthrie@psynapsetech.net
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-sql@postgresql.org
Cc: jguthrie@psynapsetech.net
Subject: Re: upcasting multiplication in a query
In-Reply-To: <037901c2ecc2$cea38a30$3dc810ac@corphq.psynapsetech.net>
* 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