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.
>