Re: Add error-checking to timestamp_recv

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Add error-checking to timestamp_recv
Date: 2004-05-20 18:17:51
Message-ID: 3357.1085077071@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I wrote:
> In general we do check incoming binary values to ensure minimal
> validity. I think when I did timestamp_recv I was thinking it was
> just like int8 or float8 (respectively), in that any bit pattern is
> potentially legal; I had forgotten about the range restrictions.

> I haven't looked at the details of Stephen's patch (and can't till the
> archives site comes back up) but the idea is probably sound.

Having looked at it, I don't like the patch as-is; it misses
timestamptz_recv and doesn't handle the boundary condition
correctly for the HasCTZSet case. However the details of the latter
are likely to change completely once we finish adopting src/timezone.
I'll make a note to do something with this issue after the TZ patch
is in.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Jorge Pereira 2004-05-20 18:20:32 Disabling triggers / constraints
Previous Message Tom Lane 2004-05-20 17:28:40 Re: Add error-checking to timestamp_recv