Andrew McNamara <andrewm@object-craft.com.au> writes:
> When submitting a query via the V3 binary protocol (PQexecParams,
> paramFormats[n]=1), it appears the PostgreSQL server performs no range
> checking on the passed values.
A quick look at time_recv() shows this is true, and timetz_recv()
checks neither the time nor the zone component.
> Passing values greater than 24 hours
> results in unpredictable results (dumps that cannot be restored,
> strange output when printing the column in psql, etc).
I'm not entirely sure why we put a range limit on time values at all,
but given that we do, it'd probably be a good idea to check the range
in the recv functions. I'm inclined to fix this for 8.4, but not
back-patch because of compatibility considerations. Any objections
out there?
regards, tom lane