| From: | Lakshmi N <lakshmin(dot)jhs(at)gmail(dot)com> |
|---|---|
| To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
| Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "dean(dot)a(dot)rasheed(at)gmail(dot)com" <dean(dot)a(dot)rasheed(at)gmail(dot)com>, "peter(at)eisentraut(dot)org" <peter(at)eisentraut(dot)org> |
| Subject: | Re: Show VIRTUAL keyword for virtual generated columns in pg_dump and psql |
| Date: | 2026-04-13 20:49:12 |
| Message-ID: | CA+3i_M8j0WqTF3_BEWkAdJk=5DjaQQhefP-yVZ1O15F_qT52kg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, Apr 13, 2026 at 5:27 AM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Monday, April 13, 2026, Lakshmi N <lakshmin(dot)jhs(at)gmail(dot)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.
>
Thank you for the feedback! Updated the patch for psql \d only.
Regards,
Lakshmi
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-psql-d-to-show-VIRTUAL-keyword-for-generated-col.patch | application/octet-stream | 28.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matheus Alcantara | 2026-04-13 21:08:40 | Re: docs: Include database collation check on SQL from alter_collation.sgml |
| Previous Message | Robert Haas | 2026-04-13 20:43:39 | Re: Why is_admin_of_role() use ROLERECURSE_MEMBERS rather thanROLERECURSE_PRIVS? |