X-Original-To: pgsql-sql@postgresql.org Received: from pxdcms01.psynapsetech.net (unknown [208.246.69.99]) by postgresql.org (Postfix) with ESMTP id A03AE475E91 for ; Mon, 17 Mar 2003 15:22:04 -0500 (EST) Received: from pidcws12 ([208.246.69.118]) by pxdcms01.psynapsetech.net (8.11.6/8.11.6) with SMTP id h2HJrEV26911 for ; Mon, 17 Mar 2003 14:53:14 -0500 Message-ID: <037901c2ecc2$cea38a30$3dc810ac@corphq.psynapsetech.net> From: "John Guthrie" To: Subject: upcasting multiplication in a query Date: Mon, 17 Mar 2003 15:21:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200303/415 X-Sequence-Number: 12454 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