| From: | Nikita Malakhov <hukutoc(at)gmail(dot)com> | 
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Passing relation metadata to Exec routine | 
| Date: | 2022-12-26 19:15:05 | 
| Message-ID: | CAN-LCVMg7s+vrWS4dQ1=Oz4euqtw6zwXsepLv3DMo0DRsmLatQ@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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?
[1] https://commitfest.postgresql.org/41/3490/
-- 
Regards,
Nikita Malakhov
Postgres Professional
https://postgrespro.ru/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Christensen | 2022-12-26 20:00:30 | Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL | 
| Previous Message | Andrew Dunstan | 2022-12-26 19:12:06 | Re: Error-safe user functions |