Re: Data type conversion - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Data type conversion
Date
Msg-id 20031003194453.GA23110@wolff.to
Whole thread Raw
In response to Data type conversion  ("Jan Pips" <jan_pips@op.pl>)
List pgsql-sql
On Fri, Oct 03, 2003 at 09:23:46 +0200, Jan Pips <jan_pips@op.pl> wrote:
> How to convert the interval type into integer, float or any "countable" data
> type at the time of table creation using
> select ... into?

You can use extract to do that. See the date/time function documentation.
Note that months get treated as 30 days when extracting periods less
than a month from an interval.


pgsql-sql by date:

Previous
From: "John B. Scalia"
Date:
Subject: Bug in psql - Postgresql 7.3.1?
Next
From: Bruno Wolff III
Date:
Subject: Re: Bug in psql - Postgresql 7.3.1?