Sv: ADD OR ALTER column

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Sv: ADD OR ALTER column
Date: 2018-01-12 14:14:22
Message-ID: VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

På fredag 12. januar 2018 kl. 14:45:07, skrev Geoff Winkless <
pgsqladmin(at)geoff(dot)dj <mailto:pgsqladmin(at)geoff(dot)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
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

 

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Geoff Winkless 2018-01-12 14:39:17 Re: ADD OR ALTER column
Previous Message Peter Eisentraut 2018-01-12 14:10:39 Re: characters converted to ??? in postgres