X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9BD19D1CE42 for ; Fri, 4 Jun 2004 14:21:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28311-03 for ; Fri, 4 Jun 2004 17:21:22 +0000 (GMT) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id 01534D1CCB6 for ; Fri, 4 Jun 2004 14:20:56 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by www.postgresql.com (Postfix) with ESMTP id E172ECF52FB for ; Fri, 4 Jun 2004 11:12:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i54EBXaB026988; Fri, 4 Jun 2004 10:11:34 -0400 (EDT) To: "Stijn Vanroye" Cc: pgsql-sql@postgresql.org Subject: Re: Difference between two times as a numeric value in a stored procedure. In-reply-to: <736CEAA26E7E3F48943458F760E7A32603B621@fs1010.farcourier.com> References: <736CEAA26E7E3F48943458F760E7A32603B621@fs1010.farcourier.com> Comments: In-reply-to "Stijn Vanroye" message dated "Fri, 04 Jun 2004 10:11:57 +0200" Date: Fri, 04 Jun 2004 10:11:33 -0400 Message-ID: <26987.1086358293@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/36 X-Sequence-Number: 17981 "Stijn Vanroye" writes: > I can't seem to find a way to substract two time values (or > timestamp values) and get a numeric/float value. I always get the > INTERVAL datatype. extract(epoch from interval) may help. regards, tom lane