Re: Patch for "CREATE TABLE ... (LIKE ... INCLUDING COMMENTS)"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: maxzor <maxzor(at)maxzor(dot)eu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for "CREATE TABLE ... (LIKE ... INCLUDING COMMENTS)"
Date: 2018-12-11 17:01:19
Message-ID: 14647.1544547679@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

maxzor <maxzor(at)maxzor(dot)eu> writes:
> This candidate patch is kind of a bug-solving patch, it applies to one
> unique file : src/backend/parser/parse_utilcmd.c,
> on function transformTableLikeClause.
> Its aim is to include the "top-level" comment of the object (table,
> view, matview...)
> that is being copied ; alongside the lower-level comments already in place.

I kind of think the existing behavior is intentional. LIKE doesn't attempt
to copy other "top level" properties such as ownership. Partly that's
because there can be only one --- what will you do when there are
multiple LIKE clauses?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2018-12-11 17:18:24 Re: Introducing SNI in TLS handshake for SSL connections
Previous Message Tom Lane 2018-12-11 14:56:54 Re: Record last password change