Re: Data type conversion

From: Jeff Boes <jboes(at)nexcerpt(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Data type conversion
Date: 2003-10-03 16:20:59
Message-ID: 4d40f22284e334a062a85a4e5edfa6fb@news.teranews.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Wei Weng 2003-10-03 19:37:33 Re: Bug in psql - Postgresql 7.3.1?
Previous Message Tom Lane 2003-10-03 15:26:23 Re: Creating Index