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

From Justin Pryzby
Subject Re: create table like: ACCESS METHOD
Date
Msg-id 20210119210331.GN8560@telsasoft.com
Whole thread Raw
In response to Re: create table like: ACCESS METHOD  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: create table like: ACCESS METHOD  (David Steele <david@pgmasters.net>)
Re: create table like: ACCESS METHOD  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
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);
                                                                                                          
 

Also, I just realized that Dilip's toast compression patch adds "INCLUDING
COMPRESSION", which is stored in pg_am.  That's an implementation detail of
that patch, but it's not intuitive that "including access method" wouldn't
include the compression stored there.  So I think this should use "INCLUDING
TABLE ACCESS METHOD" not just ACCESS METHOD.  

-- 
Justin

Attachment

pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Add primary keys to system catalogs
Next
From: Mark Rofail
Date:
Subject: Re: Add primary keys to system catalogs