Re: Fix tuple deformation with virtual generated NOT NULL columns - Mailing list pgsql-hackers

From David Rowley
Subject Re: Fix tuple deformation with virtual generated NOT NULL columns
Date
Msg-id CAApHDvrJBXEhet4=Es_wHBKdv5PCV5OGCaJOSmJexeaFqfmUHA@mail.gmail.com
Whole thread
In response to Re: Fix tuple deformation with virtual generated NOT NULL columns  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Fix tuple deformation with virtual generated NOT NULL columns
Re: Fix tuple deformation with virtual generated NOT NULL columns
List pgsql-hackers
On Fri, 12 Jun 2026 at 16:26, David Rowley <dgrowleyml@gmail.com> wrote:
> However, I don't object to adding the test if others feel it's
> worthwhile, but on looking at the patch, there are a couple of things
> that stand out.
>
> 1. Nothing has been done for the comment at the top of the file that
> says "-- keep these tests aligned with generated_stored.sql".  It
> looks like there have been quite a few commits already which have
> neglected this. Maybe that means we should do away with the comment
> rather than try to align the two.

I pushed the patch to add the new test after modifying it to also
include the change in the generated_stored test, but with it commented
out. This is the method that 83ea6c540 introduced.

Since a few commits have already put these files out of sync, maybe we
should consider having a single test file that we include with \i
after doing something like:

\set generated_type STORED
\set test_generated_stored true
\set test_generated_virtual false
\i generated_generic.sql

and have generated_generic.sql use \if test_generated_(stored|virtual)
as and when required.

> 2. I can't quite figure out the pattern in these tests for dropping vs
> not dropping the tables at the end of the test. Many tests do DROP
> TABLE and a large number of others don't bother. What's meant to be
> happening here?

I added the DROP TABLE too, as I didn't see any reason mentioned
anywhere that they should be kept.

David



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: IGNORE/RESPECT NULLS can be specified for (prokind == 'f').
Next
From: Paul A Jungwirth
Date:
Subject: FOR PORTION OF should not allow WHERE CURRENT OF