pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-general@lists.postgresql.org
Subject: Sv: ADD OR ALTER column
Date: Fri, 12 Jan 2018 15:14:22 +0100 (CET)
Message-ID: <VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena> (raw)
In-Reply-To: <CAEzk6ffdEKyoAWr8=uRXTL2=qZtqtO9iY-TYh7KtUwZ5nw07hw@mail.gmail.com>

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


 

Message-ID: <VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena>
Permalink:  ../VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@visena.com
  Subject: Re: ADD OR ALTER column
  In-Reply-To: <VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena>
  References: <CAEzk6ffdEKyoAWr8=uRXTL2=qZtqtO9iY-TYh7KtUwZ5nw07hw@mail.gmail.com> <VisenaEmail.f.107a0925fabd92e6.160eab2fa46@tc7-visena>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox