Re: CREATE FOREGIN TABLE LACUNA - Mailing list pgsql-hackers

From Robert Haas
Subject Re: CREATE FOREGIN TABLE LACUNA
Date
Msg-id CA+TgmobscZC=z4Qb8YeT=UdF_+_9ZPwGJGeXnaFpdLw7h14=RQ@mail.gmail.com
Whole thread Raw
In response to Re: CREATE FOREGIN TABLE LACUNA  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: CREATE FOREGIN TABLE LACUNA
Next
From: Greg Stark
Date:
Subject: Re: pg_upgrade and statistics