[SQL Export] Include generated columns by default
- Dominant language
- Java
- Stars
- 51.8k
- Forks
- 4.4k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 188
Description
When exporting the contents of a PostgreSQL table to SQL, at the "Format settings" step, "Include generated columns" is unticked by default.
I find this counterintuitive and dangerous: I have a table in which I needed to change the values of a serial column, so I did a backup before changing those; but when I needed to restore the backup, I found out that I couldn't because it hadn't exported the very column whose values I needed to restore.
Also, I happen to have another table with a foreign key pointing to this one, so if I back up both tables I'd expect to look at the backup and see which rows point to which ones, but by default I won't be able to see that, because the generated columns missing from the export are part of the primary key of the referenced tables. This contradicts the expectations I had from using other SQL clients in the past.
Of course, there are cases in which we want to exclude generated columns from the export, so I think it's good to have a checkbox to control that, but I strongly feel its default value should be changed.
Any thoughts? Does anyone else particularly like or dislike the current default ("Include generated columns": false)?
Contributor guide
Assessment
This issue has not been assessed yet.