Re: WIP: System Versioned Temporal Table - Mailing list pgsql-hackers

From Rémi Lapeyre
Subject Re: WIP: System Versioned Temporal Table
Date
Msg-id 00B5FD97-A568-4270-B0CF-59BA7DEEBFEA@lenstra.fr
Whole thread Raw
In response to Re: WIP: System Versioned Temporal Table  (Surafel Temesgen <surafel3000@gmail.com>)
Responses Re: WIP: System Versioned Temporal Table  (Surafel Temesgen <surafel3000@gmail.com>)
List pgsql-hackers
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.


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


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



Thanks a lot!

Rémi








Attachment

pgsql-hackers by date:

Previous
From: Rémi Lapeyre
Date:
Subject: Re: Add header support to text format and matching feature
Next
From: Tom Lane
Date:
Subject: Re: Binary support for pgoutput plugin