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

From David Fetter
Subject Re: CREATE FOREGIN TABLE LACUNA
Date
Msg-id 20120314122812.GM32168@fetter.org
Whole thread Raw
In response to CREATE FOREGIN TABLE LACUNA  (David Fetter <david@fetter.org>)
Responses Re: CREATE FOREGIN TABLE LACUNA  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Mar 13, 2012 at 08:24:47AM -0700, David Fetter wrote:
> Folks,
>
> This is for 9.3, of course.
>
> I noticed that CREATE FOREIGN TABLE (LIKE some_table) doesn't work.  I
> believe it should, as it would:
>
> - Remove a POLA violation
> - Make data loading into an extant table even easier, especially if
>   there need to be filtering or other cleanup steps
>
> Come to think of it, which CREATE TABLE options are inappropriate to
> CREATE FOREIGN TABLE?
>
> Cheers,
> David.

Here's a WIP patch (lots of cut/paste, no docs, no tests), but it does
work.  Still to do in addition: decide whether ALTER FOREIGN TABLE
should also handle LIKE.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Attachment

pgsql-hackers by date:

Previous
From: Vlad Arkhipov
Date:
Subject: Weird behaviour
Next
From: Robert Haas
Date:
Subject: Re: pg_prewarm