Re: CREATE TABLE LIKE INCLUDING INDEXES support

From: Neil Conway <neilc(at)samurai(dot)com>
To: NikhilS <nikkhils(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Trevor Hardcastle <chizu(at)spicious(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: CREATE TABLE LIKE INCLUDING INDEXES support
Date: 2007-07-10 05:57:22
Message-ID: 1184047042.8180.10.camel@goldbach
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 2007-05-06 at 14:50 +0530, NikhilS wrote:
> PFA, a patch which provides the "CREATE .. INCLUDING INDEXES"
> functionality. This patch uses the same functionality introduced by
> the earlier patches in this thread albeit for the "INCLUDING INDEXES"
> case.

Attached is a revised version of this patch. Sorry for taking so long to
make progress on this: my new job been keeping my busy, and I've
recently been ill.

This version updates the patch to CVS HEAD and has various fixes and
refactoring, including proper docs. I refactored get_opclass_name() into
lsyscache.c, but then realized that this means that lsyscache.c will
depend on commands/indexcmds.c (for GetDefaultOpClass()), which is
arguably improper, so I'm tempted to revert and just duplicate the
syscache lookups in both ruleutils.c and parse_utilcmd.c

Nikhil: why are both "options" and "inhreloptions" necessary in
IndexStmt? Won't at least one be NULL?

BTW, I notice that include/defrem.h contains declarations for several
different, marginally-related .c files (indexcmds.c, functioncmds.c,
operatorcmds.c, aggregatecmds.c, opclasscmds.c, define.c). I'm inclined
to separate these declarations into separate header files; any
objections to doing that?

-Neil

Attachment Content-Type Size
including_indexes_v3.1.patch text/x-patch 43.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message NikhilS 2007-07-10 07:23:13 Re: CREATE TABLE LIKE INCLUDING INDEXES support
Previous Message alexander lunyov 2007-07-10 04:40:24 Re: russian case-insensitive regexp search not working

Browse pgsql-patches by date

  From Date Subject
Next Message NikhilS 2007-07-10 07:23:13 Re: CREATE TABLE LIKE INCLUDING INDEXES support
Previous Message Tom Lane 2007-07-09 23:29:32 Re: Maintaining cluster order on insert