interval type additional option

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема interval type additional option
Дата
Msg-id CAFj8pRCopkH6MsOUBDzDrdiHRefuRvta8euGWbZb-R7TnYv6cg@mail.gmail.com
обсуждение исходный текст
Ответы Re: interval type additional option  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] proposal - Default namespaces for XPath expressions(PostgreSQL 11)