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

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning -odd behavior/possible bug)
Дата
Msg-id c4a7c1d4-4268-5952-c013-8c16da6018b9@joeconway.com
обсуждение исходный текст
Ответ на Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning - odd behavior/possible bug)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 09/03/2017 03:34 PM, Tom Lane wrote:
> 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.

Hmmm, good point. Sorry for the noise.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: odd behavior/possible bug (Was: Re: [HACKERS] PG10 partitioning - odd behavior/possible bug)
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] expanding inheritance in partition bound order