Re: CREATE FOREIGN TABLE ( ... LIKE ... )

From: David Fetter <david(at)fetter(dot)org>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE FOREIGN TABLE ( ... LIKE ... )
Date: 2014-01-25 05:25:01
Message-ID: 20140125052501.GA28649@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 24, 2013 at 02:03:18AM +0100, Vik Fearing wrote:
> On 10/15/2013 07:50 AM, David Fetter wrote:
> > On Mon, Oct 07, 2013 at 11:16:56PM -0700, David Fetter wrote:
> >> Folks,
> >>
> >> Please find attached a patch implementing and documenting, to some
> >> extent, $subject. I did this in aid of being able to import SQL
> >> standard catalogs and other entities where a known example could
> >> provide a template for a foreign table.
> >>
> >> Should there be errhint()s, too? Should we pile up all such errors
> >> and mention them at the end rather than simply bailing on the first
> >> one?
> >>
> >> TBD: regression tests.
> > Now included: regression tests for disallowed LIKE options.
>
> I like this patch, but I don't like its implementation at all.
>
> First of all, the documentation doesn't compile:
>
> openjade:ref/create_foreign_table.sgml:124:17:E: end tag for "LISTITEM"
> omitted, but OMITTAG NO was specified
> openjade:ref/create_foreign_table.sgml:119:4: start tag was here

Fixed.

> I fixed that, and then noticed that like_option is not explained like it
> is in CREATE TABLE.

Also fixed.

> Then I got down to the description of the LIKE clause in both pages, and
> I noticed the last line of CREATE TABLE, which is "Inapplicable options
> (e.g., INCLUDING INDEXES from a view) are ignored.". This is
> inconsistent with the behavior of this patch to throw errors for
> inapplicable options.

Fixed.

Please find attached the next rev :)

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)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 Content-Type Size
foreign_table_like_07.diff text/plain 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-01-25 06:19:47 Re: [PATCH] Support for pg_stat_archiver view
Previous Message Robert Haas 2014-01-25 03:37:42 Re: Why do we let autovacuum give up?