Re: Error for WITH options on partitioned tables

From: Japin Li <japinli(at)hotmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Error for WITH options on partitioned tables
Date: 2022-09-16 12:59:58
Message-ID: MEYP282MB1669C9F635849E4933832C13B6489@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I wrote:
> On Fri, 16 Sep 2022 at 20:13, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan S. Katz 2022-09-16 13:17:39 PostgreSQL 15 RC1 + GA dates
Previous Message Fujii Masao 2022-09-16 12:53:36 Re: Query Jumbling for CALL and SET utility statements