Passing relation metadata to Exec routine - Mailing list pgsql-hackers

From Nikita Malakhov
Subject Passing relation metadata to Exec routine
Date
Msg-id CAN-LCVMg7s+vrWS4dQ1=Oz4euqtw6zwXsepLv3DMo0DRsmLatQ@mail.gmail.com
Whole thread Raw
Responses Re: Passing relation metadata to Exec routine  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi hackers!

While working on Pluggable TOAST [1] we found out that creation
of new relation with CREATE TABLE AS... or CREATE TABLE LIKE -
method
static ObjectAddress create_ctas_internal(List *attrList, IntoClause *into)
does not receive any metadata from columns or tables used in query
(if any). It makes sense to pass not only column type and size, but
all other metadata - like attoptions,base relation OID (and, maybe,
reloptions), if the column from existing relation was used. 

A good example is the creation of new relation from base one where
some other Toaster was assigned to a column - it seems reasonable
that the same column in new table must have the same Toaster assigned
as the base one. And we already have a couple of other practical uses
for the metadata passed along with column definitions.

Any thoughts or suggestions?


--
Regards,
Nikita Malakhov
Postgres Professional 

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Error-safe user functions
Next
From: David Christensen
Date:
Subject: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL