Hi all, On Tue, Sep 15, 2026 at 5:55 PM Matheus Alcantara <[email protected]> wrote: > > On 10/07/26 18:13, Matheus Alcantara wrote: > > On Mon Mar 16, 2026 at 12:36 PM -03, Matheus Alcantara wrote: > >> Attaching v5 with documentation changes included and rebased with master. > >> > > > > Attaching v6 rebased due to changes on a4639d64e21 > > > > Attaching v7 rebased with master > > > --
I reviewed and tested the v7 patch and tested the main cases related to virtual generated columns and found the behavior to be as expected. I verified that: 1. CHECK constraint errors now show the actual value of the virtual generated column instead of virtual. 2. NULL/NOT NULL cases correctly show null in the failing row. 3. Overflow from a virtual generated column is now detected during INSERT itself instead of when the value is read. 4. UPDATE and UPDATE with CHECK constraint work as expected. 5. INSERT ... ON CONFLICT DO UPDATE correctly computes the virtual column and reports its value in the error. 6. Both MERGE ... WHEN MATCHED THEN UPDATE and MERGE ... WHEN NOT MATCHED THEN INSERT works correctly. 7. Pass-by-reference values were also tested using a virtual text generated column. 8. The generated_virtual regression test passed successfully without any issues. I also went through the relevant executor changes. The virtual generated columns are computed before constraint checking in the INSERT/UPDATE paths, and the computed values are available in the tuple slot for both constraint checking and error reporting. The corresponding simple replication INSERT/UPDATE paths have also been updated. One observation I noticed while testing the existing partition_merge regression test is that the error detail now shows the computed value instead of virtual. Since the virtual expression uses tableoid::int, the value is OID-dependent and changes between runs. I have therefore not modified partition_merge.out with a hard-coded value. The patch itself does not include a change to that expected file. Based on the above testing, the patch behaves as intended in the cases I tested. Regards Solai
