Re: Error for WITH options on partitioned tables - Mailing list pgsql-hackers

From Japin Li
Subject Re: Error for WITH options on partitioned tables
Date
Msg-id MEYP282MB1669C9F635849E4933832C13B6489@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: Error for WITH options on partitioned tables  (Japin Li <japinli@hotmail.com>)
Responses Re: Error for WITH options on partitioned tables
List pgsql-hackers
I wrote:
> On Fri, 16 Sep 2022 at 20:13, Simon Riggs <simon.riggs@enterprisedb.com> wrote:
>> Patch 002 replaces this with a more meaningful error message, which
>> matches our fine manual.
>> https://www.postgresql.org/docs/current/sql-createtable.html
>>
>>  ERROR:  cannot specify storage options for a partitioned table
>>  HINT:  specify storage options on leaf partitions instead
>
> Looks good.  Does this means we don't need the partitioned_table_reloptions()
> function and remove the reloptions validation in DefineRelation() for
> partitioned table.  Or we can ereport() in partitioned_table_reloptions().

I want to know why we should do validation for partitioned tables even if it
doesn't support storage parameters?

    /*
     * There are no options for partitioned tables yet, but this is able to do
     * some validation.
     */
    return (bytea *) build_reloptions(reloptions, validate,
                                      RELOPT_KIND_PARTITIONED,
                                      0, NULL, 0);

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Query Jumbling for CALL and SET utility statements
Next
From: "Jonathan S. Katz"
Date:
Subject: PostgreSQL 15 RC1 + GA dates