pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Fetter <david@fetter.org>
Cc: Adrian.Vondendriesch@credativ.de
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Re: [BUGS] BUG #8128: pg_dump (>= 9.1) failed while dumping a scheme named "old" from PostgreSQL 8.4
Date: Wed, 01 May 2013 13:38:34 -0400
Message-ID: <25181.1367429914@sss.pgh.pa.us> (raw)
In-Reply-To: <20130501161446.GA2127@fetter.org>
References: <E1UXCfT-0006k7-K4@wrigleys.postgresql.org>
	<15639.1367366007@sss.pgh.pa.us>
	<20130501142653.GB16330@fetter.org>
	<3523.1367421148@sss.pgh.pa.us>
	<20130501161446.GA2127@fetter.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

David Fetter <david@fetter.org> writes:
> On Wed, May 01, 2013 at 11:12:28AM -0400, Tom Lane wrote:
>> David Fetter <david@fetter.org> writes:
>>> According to SQL:2003 and SQL:2008 (and the draft standard, if
>>> that matters) in section 5.2 of Foundation, both NEW and OLD are
>>> reserved words, so we're going to need to re-reserve them to
>>> comply.

>> We don't and won't.

> Not so fast or so definite, if you please.

Yeah, I should have said "we don't and won't reserve keywords merely
because the SQL spec lists them as reserved".

> I've got a GSoC project in that implements things with both of these
> keywords, and doubtless others will use other keywords either this
> coming (9.4) cycle or in a later one.

That's fine.  When somebody submits a feature patch that requires
reserving a formerly-not-reserved word, we'll have a discussion about
whether the feature is worth the risk of breaking applications and
whether there isn't a way to avoid fully reserving the word.  Frequently
it's possible to avoid that with some grammar rearrangement.  We've
sweated blood before to avoid reserving common words, and I'm sure we
will continue that approach.

> There is a case to be made, and I'm making it here, for pre-reserving
> all the keywords and erroring out with "Feature not implemented" for
> those not yet implemented.  This would keep us, and more importantly
> our user base, from wondering when the next random change to the SQL
> language would affect them.

This is complete nonsense, because

(a) every time the SQL committee comes out with a new revision, there
are new reserved words, many of which are for features that Postgres
may not have for years, if ever.  You are simply proposing that we break
applications on the committee's timetable rather than our own, and
perhaps break them needlessly.

(b) it's often possible to implement the spec syntax without reserving
the word, or without reserving it completely.  We always do this if it's
feasible.  For example, there are a lot of functions whose names are
reserved words according to the spec, but Postgres just thinks they're
ordinary functions.  It would serve no purpose to make them really
reserved; in fact, it would make life harder for us as well as our
users.  Even where it does make it harder for us, we've always judged
that not breaking existing applications was worth a fair amount of pain.

>> There are very many other keywords that are less reserved in
>> Postgres than in the spec; this is a good thing.

> How is it a good thing?  Help me understand.

Because it avoids breaking applications that had been using those
words as object names.

			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 (11+ messages)  latest in thread

Message-ID: <25181.1367429914@sss.pgh.pa.us>
Permalink:  ../25181.1367429914@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25181.1367429914@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 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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@fetter.org, Adrian.Vondendriesch@credativ.de, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] BUG #8128: pg_dump (>= 9.1) failed while dumping a scheme named "old" from PostgreSQL 8.4
  In-Reply-To: <25181.1367429914@sss.pgh.pa.us>
  References: <E1UXCfT-0006k7-K4@wrigleys.postgresql.org> <15639.1367366007@sss.pgh.pa.us> <20130501142653.GB16330@fetter.org> <3523.1367421148@sss.pgh.pa.us> <20130501161446.GA2127@fetter.org> <25181.1367429914@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