Re: Add SPLIT PARTITION/MERGE PARTITIONS commands - Mailing list pgsql-hackers

From jian he
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id CACJufxHbuPsv3M9CiVvb-et2zfq+BxH3hST+AbzXOvG3fJ4WLA@mail.gmail.com
Whole thread Raw
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Dmitry Koval <d.koval@postgrespro.ru>)
Responses Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
List pgsql-hackers
hi.

please check the attach doc refactor for v62-0001.

            if (found_whole_row && attribute->attgenerated != '\0')
                ereport(ERROR,
                        errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                        errmsg("cannot convert whole-row table reference"),
                        errdetail("Generation expression for column
\"%s\" contains a whole-row reference to table \"%s\".",
                                  NameStr(attribute->attname),
                                  RelationGetRelationName(parent_rel)));

here ereport should be elog(ERROR...).
since this error should be unreachable. see check_nested_generated, cookDefault.

        /*
         * For the moment we have to reject whole-row variables (as for LIKE
         * and inheritances).
         */
        if (found_whole_row)
            elog(ERROR, "Constraint \"%s\" contains a whole-row
reference to table \"%s\".",
                 ccname,
                 RelationGetRelationName(parent_rel));

"table \"%s\".", we don't need that extra period.

"(as for LIKE and inheritances)":
I think you meant, “CREATE TABLE LIKE and table inheritance reject
whole-row check constraint, here we will do the same”.
maybe change to ""(as for CREATE TABLE LIKE and inheritances)".

Overall, I found v62-0001 code makes sense to me.

Attachment

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: [PATCH] Remove make_temptable_name_n()
Next
From: David Rowley
Date:
Subject: Re: MergeAppend could consider sorting cheapest child path