Spr 929 add table comment#580
Conversation
SPR-929 Use COMMENT sql to tag FDW tables with table ID
For foreign tables on the FDW/DDL mgr we use the foreign table options to store the primary table ID (oid). This is used by the policy code to validate that a table exists when applying a policy. However, we don't have a similar way to do it for partitioned tables that are created as regular, not foreign tables. The proposal is to use the COMMENT sql call to add a comment As well, on startup import schema is called to create the tables. I'm not sure if we iterate through the partition tables in another way on startup, if so we can add the COMMENT sql calls there (COMMENT can not be added directly to the import schema call), if not we will need something to iterate the non-foreign tables, and applying the COMMENT after looking them up in the tablename system table; the system table indicates if the table is a regular table by the presence of a Lastly, in the policy branch, there is a check for table existence, currently it checks the foreign table options for the TID, a check must be added to check the comments for the TID as well. |
garthgoodson
left a comment
There was a problem hiding this comment.
Couple of improvements suggested.
|



Added support for table comment for partitioned tables.