Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning - odd behavior/possible bug)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning - odd behavior/possible bug)
Дата
Msg-id 20986.1504478066@sss.pgh.pa.us
обсуждение исходный текст
Ответ на odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning - oddbehavior/possible bug)  (Joe Conway <mail@joeconway.com>)
Ответы Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning -odd behavior/possible bug)  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> Notice that tsr is not empty at all on the first loop, but on the second
> loop it is empty every second time the trigger fires.

I think the issue is that now() isn't changing within the transaction,
so when you construct "tstzrange(lower(OLD.tr), now(), '[)')" using an
old row whose "lower(OLD.tr)" is already "now()", you get an empty range.
Probably using '[]' bounds would avoid the oddness.
        regards, tom lane



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

Предыдущее
От: Joe Conway
Дата:
Сообщение: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning - oddbehavior/possible bug)
Следующее
От: Joe Conway
Дата:
Сообщение: Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning -odd behavior/possible bug)