Sv: ADD OR ALTER column - Mailing list pgsql-general

From Andreas Joseph Krogh
Subject Sv: ADD OR ALTER column
Date
Msg-id VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena
Whole thread Raw
In response to ADD OR ALTER column  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-general
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...
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Attachment

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: characters converted to ??? in postgres
Next
From: Geoff Winkless
Date:
Subject: Re: ADD OR ALTER column