interval type additional option - Mailing list pgsql-hackers

From Pavel Stehule
Subject interval type additional option
Date
Msg-id CAFj8pRCopkH6MsOUBDzDrdiHRefuRvta8euGWbZb-R7TnYv6cg@mail.gmail.com
Whole thread Raw
Responses Re: interval type additional option
List pgsql-hackers
Hi

I have a value '400 days 30 sec':: interval

I don't understand why cast

postgres=# select '400days 30sec'::interval minute to second;
+-------------------+
|     interval      |
+-------------------+
| 400 days 00:00:30 |
+-------------------+
(1 row)

produce 400 days

or

postgres=# create table foo(a interval minute to second);
CREATE TABLE
postgres=# insert into foo values('400 days');
INSERT 0 1
postgres=# select * from foo;
+----------+
|    a     |
+----------+
| 400 days |
+----------+
(1 row)

What is sense of this feature?

Regards

Pavel

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] proposal - Default namespaces for XPath expressions(PostgreSQL 11)