pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Emre Hasegeli <emre@hasegeli.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Matthias Kurz <m.kurz@irregular.at>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: [PATCH] Alter or rename enum value
Date: Tue, 06 Sep 2016 14:30:27 -0400
Message-ID: <8384.1473186627@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoaz9OSD1Zbf4kMfEDV8OMGM6x2=kWxAxd1XPCfTWW1f8Q@mail.gmail.com>
References: <CAO=2mx6uvgPaPDf-rHqG8=1MZnGyVDMQeh8zS4euRyyg4D35OQ@mail.gmail.com>
	<56E049CC.8010201@dunslane.net>
	<25605.1457539654@sss.pgh.pa.us>
	<56E05635.70908@dunslane.net>
	<28167.1457543612@sss.pgh.pa.us>
	<CAO=2mx4rQHRvifT2yUQ1rz90A=9CVz4_Z0Sx1wTgwgQRzAimpQ@mail.gmail.com>
	<CAO=2mx6rK_h4BC7y+3Nu-8fuZJXdFjd9FE_MZnzkH+vnMp0C-Q@mail.gmail.com>
	<d8ja8ln7nl0.fsf@dalvik.ping.uio.no>
	<d8jk2kn4yn0.fsf_-_@dalvik.ping.uio.no>
	<d8jeg5m4as8.fsf@dalvik.ping.uio.no>
	<CAE2gYzxo4bB_uQDafQYoGx=WmUrO-NFUbKBYfu4j_=LfaaUzFg@mail.gmail.com>
	<d8jy43m2wow.fsf@dalvik.ping.uio.no>
	<CAE2gYzy9fWFmMgnA0DstcGdtuFv40d3JXgtikE-ywtZ2qow=ng@mail.gmail.com>
	<26875.1472935684@sss.pgh.pa.us>
	<CAE2gYzzoWnzmz3MhiSr_49Mjjah4KXju-N81Bjc9p95-YcxpcA@mail.gmail.com>
	<32710.1473099022@sss.pgh.pa.us>
	<CA+Tgmoaz9OSD1Zbf4kMfEDV8OMGM6x2=kWxAxd1XPCfTWW1f8Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Sep 5, 2016 at 11:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... And again, it's
>> hard to get excited about having these options for RENAME VALUE when no
>> one has felt a need for them yet in RENAME COLUMN.  I'm especially dubious
>> about IF NOT EXISTS against the destination name, considering that there
>> isn't *any* variant of RENAME that has an equivalent of that.  If it's
>> really useful, why hasn't that happened?

> Because Tom Lane keeps voting against every patch to expand IF [ NOT ]
> EXISTS into a new area?  :-)

Well, I'm on record as not liking the squishy semantics of CREATE IF NOT
EXISTS, and you could certainly make the same argument against RENAME IF
NOT EXISTS: you don't really know what state you will have after the
command executes.  But that wasn't the point I was trying to make here.

> We do have ALTER TABLE [ IF EXISTS ] .. ADD COLUMN [ IF NOT EXISTS ],
> so if somebody wanted the [ IF NOT EXISTS ] clause to also apply to
> the RENAME COLUMN case, they'd have a good argument for adding it.

If someone wanted to propose adding IF NOT EXISTS to our rename
commands across-the-board, that would be a sensible feature to discuss.
What I'm objecting to is this one niche-case command getting out in
front of far-more-widely-used commands in terms of having such features.
I think the fact that we don't already have it in other rename commands
is pretty strong evidence that this is a made-up feature rather than
something with actual field demand.  I'm also concerned about adding it
in just one place like this; we might find ourselves boxed in in terms of
hitting syntax conflicts when we try to duplicate the feature elsewhere,
if we haven't done the legwork to add it to all variants of RENAME at
the same time.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (56+ messages)  latest in thread

Message-ID: <8384.1473186627@sss.pgh.pa.us>
Permalink:  ../8384.1473186627@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8384.1473186627@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, emre@hasegeli.com, ilmari@ilmari.org, andrew@dunslane.net, m.kurz@irregular.at, Jim.Nasby@bluetreble.com, david.g.johnston@gmail.com
  Subject: Re: [PATCH] Alter or rename enum value
  In-Reply-To: <8384.1473186627@sss.pgh.pa.us>

* 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