På fredag 12. januar 2018 kl. 14:45:07, skrev Geoff Winkless <pgsqladmin@geoff.dj>:
I'm probably missing something, but can anyone see a reason why adding an ADD OR ALTER COLUMN syntax to the ALTER TABLE command isn't either a) achievable or b) desirable?
It seems to me to be eminently useful and not overly difficult, while potentially saving a significant amount of effort on the part of users.
Geoff
What about using
ALTER TABLE tab ADD COLUMN IF NOT EXISTS mycol mytype;
I don't think there's an ALTER COLUMN IF EXISTS tho...