Re: proposal: simple date constructor from numeric values
От | Pavel Stehule |
---|---|
Тема | Re: proposal: simple date constructor from numeric values |
Дата | |
Msg-id | CAFj8pRAQM-F4pmH5WkoeFNbarWbRPVvdQc=_+=imk2OzKPHWVw@mail.gmail.com обсуждение исходный текст |
Ответ на | proposal: simple date constructor from numeric values (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: simple date constructor from numeric values
Re: proposal: simple date constructor from numeric values |
Список | pgsql-hackers |
Hello 2013/6/29 Pavel Stehule <pavel.stehule@gmail.com>: > Hello > > long time I am thinking about simple function for creating date or > timestamp values based on numeric types without necessity to create > format string. > > some like ansi_date(year, month, day) and ansi_timestamp(year, month, > day, hour, minuts, sec, msec, offset) > > What do you think about this idea? I found so same idea was discussed three years ago http://www.postgresql.org/message-id/14107.1276443739@sss.pgh.pa.us and it is a part of our ToDo: "Add function to allow the creation of timestamps using parameters" so we can have a functions with signatures CREATE OR REPLACE FUNCTION construct_date(year int, month int DEFAULT 1, day int DEFAULT 1) RETURNS date; CREATE OR REPLACE FUNCTION construct_time(hour int DEFAULT 0, mi int DEFAULT 0, sec int DEFAULT 0, ms float DEFAULT 0.0); CREATE OR REPLACE FUNCTION construct_timestap(year int, month int DEFAULT .... CREATE OR REPLACE FUNCTION construct_timestamp_with_timezone(year int, month int DEFAULT1, ... ??? Regards Pavel Stehule > > Regards > > Pavel Stehule
В списке pgsql-hackers по дате отправления: