Re: Calculation error
От | Wil Duis |
---|---|
Тема | Re: Calculation error |
Дата | |
Msg-id | 3EDDBA8A.EE124642@asml.nl обсуждение исходный текст |
Ответ на | Calculation error (Wil Duis <Wil.Duis@asml.com>) |
Список | pgsql-novice |
Hi Tom Sorry for my delayed reaction, but I didn't have much time yesterday. On a trial and error way I tried a lot of variations, but up to now without success; The closest to succes (I guess) was by using the following syntax: v_startmoment := ''timestamp(''||p_start_date||'', ''||p_start_time||'')''; but this resulted in error: ERROR: Bad timestamp external representation 'timestamp(2003-05-14, 01:20:40)' This supprised me since executing from commandline: select timestamp'2003-05-10 01:20:40'; works fine! So, all suggestions are still welcome. Regards: Wil Tom Lane wrote: > > The function name "timestamp" needs to be double quoted here to avoid a > syntax conflict with the type declaration syntax TIMESTAMP(n). But > actually I'd use timestamptz, assuming that your dates and times are in > local time --- the above calculation will give the wrong answers across > a daylight-savings transition. >
В списке pgsql-novice по дате отправления: