From: Bruno Wolff III <bruno@wolff.to>
To: Jan Pips <jan_pips@op.pl>
Cc: pgsql-sql@postgresql.org
Subject: Re: Data type conversion
Date: Fri, 3 Oct 2003 14:44:53 -0500
Message-ID: <20031003194453.GA23110@wolff.to> (raw)
In-Reply-To: <blj80p$ga5$1@foka1.acn.pl>
References: <blj80p$ga5$1@foka1.acn.pl>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, jan_pips@op.pl
Subject: Re: Data type conversion
In-Reply-To: <20031003194453.GA23110@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox