Re: create table like: ACCESS METHOD

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Jacob Champion <pchampion(at)vmware(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Ashwin Agrawal <aagrawal(at)pivotal(dot)io>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: create table like: ACCESS METHOD
Date: 2021-10-01 08:01:33
Message-ID: YVbAXQc9oaIYfkN1@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 09, 2021 at 02:30:51PM +0200, Peter Eisentraut wrote:
> Hmm. The problem is that the LIKE clause is really a macro that expands to
> the column definitions of the other table. So there is, so far, no such as
> thing as two LIKE clauses contradicting. Whereas the access method is a
> table property. So I don't think this syntax is the right approach for this
> feature.
>
> You might think about something like
>
> CREATE TABLE t2 (...) USING (LIKE t1);
>
> At least in terms of how the syntax should be structured.

Good point. I have marked the patch as RwF.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-10-01 08:14:22 Re: Logical replication keepalive flood
Previous Message Michael Paquier 2021-10-01 07:58:41 Re: pg_upgrade test for binary compatibility of core data types