public inbox for [email protected]
help / color / mirror / Atom feedFrom: Amit Kapila <[email protected]>
To: shveta malik <[email protected]>
Cc: Yu Shi (Fujitsu) <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Ajin Cherian <[email protected]>
Cc: Wei Wang (Fujitsu) <[email protected]>
Cc: Runqi Tian <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: li jie <[email protected]>
Cc: Dilip Kumar <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Cc: Japin Li <[email protected]>
Cc: rajesh singarapu <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Zheng Li <[email protected]>
Subject: Re: Support logical replication of DDLs
Date: Thu, 8 Jun 2023 10:35:54 +0530
Message-ID: <CAA4eK1LF3EaCSj5iqO0oT1k3ew7YnQbbKEgbzORDAdvdtd+r7w@mail.gmail.com> (raw)
In-Reply-To: <CAA4eK1LOr+2O+_pWKTaa0y9vbW6whfm-8-fuBvnS6OBiaR+7TA@mail.gmail.com>
References: <CALDaNm3zSxK1g0UTo4RjPR3JEc-vyPzANOnKEKjiW88xtUUdzA@mail.gmail.com>
<CAJpy0uCGnRQnpNVQaApRxqN=9t5VpHRk5b+Mfdf3cqCEW=s+4A@mail.gmail.com>
<OSZPR01MB63102C42A24D59FACF6D9CD6FD4A9@OSZPR01MB6310.jpnprd01.prod.outlook.com>
<CAJpy0uCbwqWj+p_yj1AHyiufzAUv_H29qOaztAXxFoTqZ9WcAw@mail.gmail.com>
<OSZPR01MB6310E0509F229AF2A9414BB1FD499@OSZPR01MB6310.jpnprd01.prod.outlook.com>
<CAJpy0uBwCZCniPR6vh26L+wpSf4xzUN8omUa9DzF-x1CAud_xA@mail.gmail.com>
<CAA4eK1LOr+2O+_pWKTaa0y9vbW6whfm-8-fuBvnS6OBiaR+7TA@mail.gmail.com>
On Tue, Jun 6, 2023 at 4:26 PM Amit Kapila <[email protected]> wrote:
>
>
> Few assorted comments:
> ===================
>
Few comments on 0008* patch:
==============================
1. After 0008*, deparse_CreateStmt(), forms dpcontext before forming
identity whereas it is required only after it. It may not matter
practically but it is better to do the work when it is required. Also,
before 0008, it appears to be formed after identity, so not sure if
the change in 0008 is intentional, if so, then please let me know the
reason, and may be it is better to add a comment for the same.
2. Similarly, what is need to separately do insert_identity_object()
in deparse_CreateStmt() instead of directly doing something like
new_objtree_for_qualname() as we are doing in 0001 patch? For this, I
guess you need objtype handling in new_jsonb_VA().
3.
/*
* It will be of array type for multi-columns table, so lets begin
* an arrayobject. deparse_TableElems_ToJsonb() will add elements
* to it.
*/
pushJsonbValue(&state, WJB_BEGIN_ARRAY, NULL);
deparse_TableElems_ToJsonb(state, relation, node->tableElts, dpcontext,
false, /* not typed table */
false); /* not composite */
deparse_Constraints_ToJsonb(state, objectId);
pushJsonbValue(&state, WJB_END_ARRAY, NULL);
This part of the code is repeated in deparse_CreateStmt(). Can we move
this to a separate function?
4.
* Note we ignore constraints in the parse node here; they are extracted from
* system catalogs instead.
*/
static void
deparse_TableElems_ToJsonb(JsonbParseState *state, Relation relation,
An extra empty line between the comments end and function appears unnecessary.
5.
+ /* creat name and type elements for column */
/creat/create
--
With Regards,
Amit Kapila.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Support logical replication of DDLs
In-Reply-To: <CAA4eK1LF3EaCSj5iqO0oT1k3ew7YnQbbKEgbzORDAdvdtd+r7w@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox