Re: make_interval ??
От | Pavel Stehule |
---|---|
Тема | Re: make_interval ?? |
Дата | |
Msg-id | CAFj8pRBT3jmiGNWQZrhBPA0cr4XfF5+OKHqiwSxBLyCoeo4AQg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: make_interval ?? (Josh Berkus <josh@agliodbs.com>) |
Список | pgsql-hackers |
Hello
here is patchpostgres=# select make_interval(years := 1, months := 6);
make_interval
---------------
1 year 6 mons
(1 row)
postgres=# select make_interval(weeks := 3);
make_interval
---------------
21 days
(1 row)
postgres=# select make_interval(days := 10);
make_interval
---------------
10 days
(1 row)
postgres=# select make_interval(hours := 2, mins := 10, secs := 25.33);
make_interval
---------------
02:10:25.33
(1 row)
2013/12/21 Josh Berkus <josh@agliodbs.com>
On 12/20/2013 04:44 PM, Gavin Flower wrote:Your question isn't relevant to this patch. It's not defining the
> On 21/12/13 13:40, Josh Berkus wrote:
>> On 12/20/2013 03:09 PM, Gavin Flower wrote:
>>> What about leap years?
>> What about them?
>>
> some years have 365 days others have 366, so how any days in an interval
> of 2 years?, 4 years?
interval type, just creating an alternate constructor for it.
(the answer is, it depends on what timestamp you're adding it to ...)--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: