Skip site navigation (1) Skip section navigation (2)

Re: Misleading CREATE TABLE error

From: Thom Brown <thom(at)linux(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Misleading CREATE TABLE error
Date: 2011-12-28 02:00:38
Message-ID: CAA-aLv7zH+Wo-aFerM+yfKvJsRMTQP=eUgBe_1DDwVTxxBXVjg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 27 December 2011 20:16, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> It's not only the error message that's misleading, but the whole code,
> because the entire code for CREATE TABLE ... (LIKE ...) claims to do
> "inheritance" based on an ancient understanding of the SQL standard.  I
> know this has confused me many times already, so I decided to clean this
> up and rename all the internal parser structures, split up the
> regression tests for real inheritance and CREATE TABLE LIKE, and adjust
> the error messages.  Patch attached.

Thanks for the patch. +1 for changing "parent" to "source" in the
docs.  The patch doesn't apply cleanly for me for some reason though.

> Anyway, one question that's perhaps worth discussing
> is whether we should allow and disallow the various INCLUDING options
> depending on the relation type.  For example, views don't have indexes,
> so should we disallow INCLUDING INDEXES or just assume they don't have
> any?

I'd personally prefer the latter, primarily because it won't create
another syntax variation with no discernable benefit.

-- 
Thom

In response to

pgsql-hackers by date

Next:From: Simon RiggsDate: 2011-12-28 02:54:02
Subject: Re: 16-bit page checksums for 9.2
Previous:From: Steve CrawfordDate: 2011-12-28 01:51:06
Subject: pgstat wait timeout

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group