Re: No sanity checking performed on binary TIME parameters.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: No sanity checking performed on binary TIME parameters.
Дата
Msg-id 3206.1243263161@sss.pgh.pa.us
обсуждение исходный текст
Ответ на No sanity checking performed on binary TIME parameters.  (Andrew McNamara <andrewm@object-craft.com.au>)
Ответы Re: No sanity checking performed on binary TIME parameters.  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joshua Tolley
Дата:
Сообщение: Re: generic options for explain
Следующее
От: Tom Lane
Дата:
Сообщение: Re: generic options for explain