Re: CREATE FOREGIN TABLE LACUNA

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: David Fetter <david@fetter.org>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-15T15:58:57Z
Lists: pgsql-hackers
On Thu, Mar 15, 2012 at 10:23 AM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Looks much better to me, but the use of strcmp() doesn't look good.
> ISTM that stmtType is mostly used for error messages.  I think you
> should add some kind of identifier (such as the original parser Node)
> into the CreateStmtContext so that you can do a IsA() test instead -- a
> bit more invasive as a patch, but much cleaner.

+1.  Or maybe add a relkind to CreateStmt, if it isn't there already,
and test that.

> Also the error messages need more work.

+1.  I suggest something like "ERROR: foreign tables do not support
LIKE INCLUDING INDEXES".

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company