Laurent <lduperval(at)gmail(dot)com> writes:
> CREATE or replace FUNCTION updateDates() RETURNS void AS $$
> declare
> currentDate timestamp(3);
> BEGIN
> currentDate = := round_time(current_date);
> ...
> -- here I update my date
> END;
> $$ LANGUAGE SQL;
> The problem is that my currentDate declaration always generates an
> error:
> ********** Error **********
> ERROR: syntax error at or near "timestamp"
The problem's at the other end of that command :-(. You need to
say language plpgsql, not language sql.
regards, tom lane