X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9BE16D1B513 for ; Fri, 3 Oct 2003 16:50:25 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 90862-03 for ; Fri, 3 Oct 2003 13:49:40 -0300 (ADT) Received: from news.hub.org (unknown [64.117.224.194]) by svr1.postgresql.org (Postfix) with ESMTP id 734A5D1B55C for ; Fri, 3 Oct 2003 13:49:39 -0300 (ADT) Received: from news.hub.org (host-64-117-224-194.altec1.com [64.117.224.194] (may be forged)) by news.hub.org (8.12.9/8.12.9) with ESMTP id h93GndQj070483 for ; Fri, 3 Oct 2003 16:49:39 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h93GNtkl047961 for pgsql-sql@postgresql.org; Fri, 3 Oct 2003 16:23:55 GMT X-Abuse-Report: abuse@teranews.com Message-ID: <4d40f22284e334a062a85a4e5edfa6fb@news.teranews.com> Date: Fri, 03 Oct 2003 16:20:59 GMT Lines: 18 From: Jeff Boes Organization: Nexcerpt, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Data type conversion References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/47 X-Sequence-Number: 15447 Jan Pips wrote: > How to convert the interval type into integer, float or any "countable" data > type at the time of table creation using > select ... into? > I'm guessing you want something like this: SELECT EXTRACT('EPOCH' FROM INTERVAL '1 days 4 hours 15 minutes 23 seconds'); -- Jeff Boes vox 269.226.9550 ext 24 Database Engineer fax 269.349.9076 Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt... Extend your Expertise