On 2021/04/06 21:06, Kazutaka Onishi wrote:
Thank you for checking v13, and here is v14 patch.
1) Are we using all of these macros? I see that we are setting them
but we only use TRUNCATE_REL_CONTEXT_ONLY. If not used, can we remove
them?
These may be needed for the foreign data handler other than postgres_fdw.
Could you tell me how such FDWs use TRUNCATE_REL_CONTEXT_CASCADING and _NORMAL?
I'm still not sure if TRUNCATE_REL_CONTEXT_CASCADING is really required.
With the patch, both inherited and referencing relations are marked as
TRUNCATE_REL_CONTEXT_CASCADING? Is this ok for that use? Or we should
distinguish them?
+#define TRUNCATE_REL_CONTEXT_NORMAL 0x01
+#define TRUNCATE_REL_CONTEXT_ONLY 0x02
+#define TRUNCATE_REL_CONTEXT_CASCADING 0x04
With the patch, these are defined as flag bits. But ExecuteTruncate() seems to
always set the entry in relids_extra to either of them, not the combination of
them. So we can define them as enum?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION