pgadmin-org / pgadmin-org/pgadmin4
Generated always columns are not properly handled in View/Edit Data
@RohitBhati8269 is already working on this.
Since Mar 16, 2026.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Generated always columns are not properly handled in View/Edit Data
Editing data in tables which includes one (or more) generated always column can be a nightmare.
If by accident you change the value of one such column(s), there seem to be no way to reset its value to "[default]". As a consequence, you cannot save your (other, wanted) changes since obviously that will result in an error:
cannot insert a non-DEFAULT value into column "...."
Column "...." is a generated column.
As a consequence, you can not e.g. add row(s) to such a table by duplicating existing ones (copy/paste a row) and and then change the values in some of the (non generated) columns.
A similar issue exists when Importing Data from CSV files, though that perhaps can be handled by selecting which columns to import (but I am afraid that can work only if the generated column(s) are the very last one(s), after all the "normal" ones).
To Reproduce
Trivial:
- Create a table including PK, some normal columns and at least one generated column (GENERATED ALWAYS AS ...);
- Open it in the View/Edit Data tool;
- Select a row;
- Click on the "Copy" icon;
- Click on the "Paste" icon;
- Change some of the non-generated columns (pkey and whatever);
- try to save ==> Error
- would like to change the generate column to "[default]" to avoid that error: can't fine any way to do so.
Expected behavior
-
Generated columns should be handled properly: attempts to directly change their value to anything but "DEFAULT" should be disabled, and any value pasted into them should be ignored (otherwise copy/paste of a whole row would be impossible).
-
Queries generated by View/Edit Data must properly handle generated always columns in insert / update queries (always set them to DEFAULT, regardless of the corresponding cell content in the GUI).
-
Right-clicking on any "cell" should give the possibility to reset its value to [default] (and [null] as well).
Other possible (unrelated) improvement:
- cell selections should obey the standard modifiers: Shift to select a range of "cells", Ctrl to add a column to the existing selection, ecc.
Desktop (please complete the following information):
- OS: Debian GNU/Linux 13 (trixie)
- DE : KDE Plasma
- pgAdmin version: 9.12
- Mode: Desktop
- Package type: DEB (from ftp.postgresql.org repository)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.