Re: Show VIRTUAL keyword for virtual generated columns in pg_dump and psql - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Show VIRTUAL keyword for virtual generated columns in pg_dump and psql
Date
Msg-id CAKFQuwan3J1WdqtiXr4u9Lmj+5Z7r+hYOKfy_A1g23_8f90LWw@mail.gmail.com
Whole thread
In response to Show VIRTUAL keyword for virtual generated columns in pg_dump and psql  (Lakshmi N <lakshmin.jhs@gmail.com>)
Responses Re: Show VIRTUAL keyword for virtual generated columns in pg_dump and psql
List pgsql-hackers
On Monday, April 13, 2026, Lakshmi N <lakshmin.jhs@gmail.com> wrote:
pg_dump and psql's \d currently display stored and virtual generated
columns asymmetrically:


    s_total integer GENERATED ALWAYS AS ((a + b)) STORED
    v_total integer GENERATED ALWAYS AS ((a + b))

Since VIRTUAL is default most likely this was omitted but with this
puts the burden on the reader to identify whether it is STORED or 
VIRTUAL since both kinds coexist in v19.

The output follows existing conventions of not printing extraneous text.  Additionally, storage itself is non-standard so the absence of a modifier is producing standard-compliant output.  I would -1 changing pg_dump on this basis.  I’d be inclined to go with the symmetry/readability argument for psql \d though.

David J.

pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Heads Up: cirrus-ci is shutting down June 1st
Next
From: Soumya S Murali
Date:
Subject: Re: Fix bug with accessing to temporary tables of other sessions