From: | Wil Duis <Wil(dot)Duis(at)asml(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Calculation error |
Date: | 2003-06-04 09:23:22 |
Message-ID: | 3EDDBA8A.EE124642@asml.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Aarni Ruuhimäki | 2003-06-04 14:33:11 | locale support |
Previous Message | Paul Makepeace | 2003-06-02 22:07:24 | [bug?] oddity creating table with uppercase initial |