public inbox for [email protected]  
help / color / mirror / Atom feed
From: jian he <[email protected]>
To: Dmitry Koval <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Wed, 15 Oct 2025 19:34:37 +0800
Message-ID: <CACJufxHbuPsv3M9CiVvb-et2zfq+BxH3hST+AbzXOvG3fJ4WLA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org>
	<[email protected]>
	<CACJufxGWCVf5r9kE-z6MyR2b+wkaU15Q5m2tKz4cvBhYX3-x1g@mail.gmail.com>
	<[email protected]>
	<CAPpHfdshkf0C2h09S00TVB8h3x8UT+GZyQ6LK2WGg1hOjnNE4g@mail.gmail.com>
	<CAPpHfdsh_jPZ6-2JtWoFeZravVQYY4cYCcnKXQW6KxEx+F5vxg@mail.gmail.com>
	<[email protected]>
	<CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CACJufxET9Qe-=zJtjGrKPr7-1QbVcP9y-vJU9CMEDfPGt_dbyg@mail.gmail.com>
	<[email protected]>
	<CACJufxEBvrtcOWyX2NMwOCvb2ZvaRGaGeiMQpUD=yxL6ncBFOg@mail.gmail.com>
	<[email protected]>
	<CACJufxGc6e5wT3oXs3B8LHEs9pR4z9gmNx_UrX6EX9=pWzNkHg@mail.gmail.com>
	<[email protected]>

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.


Attachments:

  [application/octet-stream] v62-0001-doc-refactor-alter-table-merge-partitions-v62.no-cfbot (6.6K, ../CACJufxHbuPsv3M9CiVvb-et2zfq+BxH3hST+AbzXOvG3fJ4WLA@mail.gmail.com/2-v62-0001-doc-refactor-alter-table-merge-partitions-v62.no-cfbot)
  download

view thread (165+ messages)  latest in thread

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]
  Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
  In-Reply-To: <CACJufxHbuPsv3M9CiVvb-et2zfq+BxH3hST+AbzXOvG3fJ4WLA@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