Re: Add error-checking to timestamp_recv

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Add error-checking to timestamp_recv
Дата
Msg-id 20040520124232.GS11196@ns.snowman.net
обсуждение исходный текст
Ответ на Re: Add error-checking to timestamp_recv  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Add error-checking to timestamp_recv  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Add error-checking to timestamp_recv  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
* Bruce Momjian (pgman@candle.pha.pa.us) wrote:
> Would you show an example of the invalid value this is trying to avoid?

Well, the way I discovered the problem was by sending a timestamp in
double format when the server was expecting one in int64 format.  This
is when using the binary data method for timestamps.  I'll generate a
small example program/schema later today and post it to the list.

    Stephen

> ---------------------------------------------------------------------------
>
> Stephen Frost wrote:
> > Greetings,
> >
> >   The attached patch adds some error-checking to the timestamp_recv
> >   function so that it's not possible to put an invalid timestamp into a
> >   timestamp column (hopefully).  The check is done in basically the
> >   exact same way the out-of-bounds check in timestamp2tm is done.
> >   There's probably an easier/cleaner way but this should work or at
> >   least generate discussion and a better patch. :)
> >
> >       Thanks,
> >
> >         Stephen
>
> [ Attachment, skipping... ]
>
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> >                http://archives.postgresql.org
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Вложения

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

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: pgkill for windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add error-checking to timestamp_recv