Re: WIP: System Versioned Temporal Table

Поиск
Список
Период
Сортировка
От Surafel Temesgen
Тема Re: WIP: System Versioned Temporal Table
Дата
Msg-id CALAY4q8ko8kpY-cm84XNNEnBdSqWUr1K5ZRmWLJy8aXG_Thrjw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: System Versioned Temporal Table  (Rémi Lapeyre <remi.lapeyre@lenstra.fr>)
Ответы Re: WIP: System Versioned Temporal Table  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hey Rémi,
Thank you for looking at it

On Sat, Jul 18, 2020 at 7:05 PM Rémi Lapeyre <remi.lapeyre@lenstra.fr> wrote:
Hi, thanks for working on this. I had planned to work on it and I’m looking forward to this natively in Postgres.

The patch builds with the following warnings:

plancat.c:2368:18: warning: variable 'name' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
        for (int i = 0; i < natts; i++)
                        ^~~~~~~~~
plancat.c:2379:9: note: uninitialized use occurs here
        return name;
               ^~~~
plancat.c:2368:18: note: remove the condition if it is always true
        for (int i = 0; i < natts; i++)
                        ^~~~~~~~~
plancat.c:2363:15: note: initialize the variable 'name' to silence this warning
        char       *name;
                        ^
                         = NULL
plancat.c:2396:18: warning: variable 'name' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
        for (int i = 0; i < natts; i++)
                        ^~~~~~~~~
plancat.c:2407:9: note: uninitialized use occurs here
        return name;
               ^~~~
plancat.c:2396:18: note: remove the condition if it is always true
        for (int i = 0; i < natts; i++)
                        ^~~~~~~~~
plancat.c:2391:15: note: initialize the variable 'name' to silence this warning
        char       *name;
                        ^
                         = NULL
2 warnings generated.




I wonder why my compiler didn't show me this

make check pass without issues, but make check-world fails for postgres_fdw, the diff is attached.


 Okay thanks the attached patch contains a fix for both issue


Before going further in the review, I’m a bit surprised by the quantity of code needed here. In https://github.com/xocolatl/periods there is far less code and I would have expected the same here. For example, are the changes to copy necessary or would it be possible to have a first patch the only implement the minimal changes required for this feature?


Yes  there not many c code in there because most of the logice is written in SQL

regards
Surafel
Вложения

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Allow ERROR from heap_prepare_freeze_tuple to be downgraded to WARNING
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Improving psql slash usage help message