Re: create table like: ACCESS METHOD - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: create table like: ACCESS METHOD
Date
Msg-id b6102f5b-0753-3f96-071d-5c2b99795159@postgresfriends.org
Whole thread Raw
In response to Re: create table like: ACCESS METHOD  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: create table like: ACCESS METHOD
Re: create table like: ACCESS METHOD
List pgsql-hackers
On 3/23/21 1:39 AM, Justin Pryzby wrote:
> On Tue, Jan 19, 2021 at 03:03:31PM -0600, Justin Pryzby wrote:
>> On Wed, Dec 30, 2020 at 12:33:56PM +0000, Simon Riggs wrote:
>>> There are no tests for the new functionality, please could you add some?
>>
>> Did you look at the most recent patch?
>>
>> +CREATE ACCESS METHOD heapdup TYPE TABLE HANDLER heap_tableam_handler;
>> +CREATE TABLE likeam() USING heapdup;
>> +CREATE TABLE likeamlike(LIKE likeam INCLUDING ALL);
                                                                                                             
 

It seems like this should error to me:

CREATE ACCESS METHOD heapdup TYPE TABLE HANDLER heap_tableam_handler;
CREATE TABLE likeam1() USING heap;
CREATE TABLE likeam2() USING heapdup;
CREATE TABLE likeamlike(
    LIKE likeam1 INCLUDING ACCESS METHOD,
    LIKE likeam2 INCLUDING ACCESS METHOD
);

At the very least, the documentation should say that the last one wins.
-- 
Vik Fearing



pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: perlcritic: prohibit map and grep in void conext
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: [PATCH] Tab completion for ALTER TABLE … ADD …