Re: Fix tuple deformation with virtual generated NOT NULL columns

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chao Li <li.evan.chao@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, Andres Freund <andres@anarazel.de>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-17T23:37:18Z
Lists: pgsql-hackers

Attachments

On Thu, 18 Jun 2026 at 11:06, David Rowley <dgrowleyml@gmail.com> wrote:
> Just starting to look now, but I suspect that this code in
> llvmjit_deform.c needs to be updated now that we have virtual
> generated columns.

I've not fully processed all this code yet. I've still not worked out
why the loop that sets guaranteed_column_number doesn't break when it
finds something non-guaranteed.

Here's a draft patch I was experimenting with. It seems to fix the
issue. I need to spend more time to check it's correct.

David

Commits

  1. Update JIT tuple deforming code for virtual generated columns

  2. Add tuple deformation test for virtual generated columns

  3. Fix tuple deforming with virtual generated columns