make_interval ??

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: make_interval ??
Date: 2013-12-20 07:59:41
Message-ID: CAFj8pRAfXSA86NFMHff5UCzLmbR_GTGMh0efNaem7oBdWpqcNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

we have defined interface date, time, timestamp constructors.

There is a question if we would to have some similar for interval type?

As different from time, timestamp there we can use a zero as defaults.

So constructor should to look like:

CREATE OR REPLACE FUNCTION make_interval(years int DEFAULT 0, months int
DEFAULT 0, ...)

and usage:

SELECT make_interval(years := 2)
SELECT make_interval(days := 14)

Is there a interest for this (or similar) function?

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu kommi 2013-12-20 09:13:10 Re: New option for pg_basebackup, to specify a different directory for pg_xlog
Previous Message Michael Paquier 2013-12-20 05:35:05 Re: Logging WAL when updating hintbit