Re: Error for WITH options on partitioned tables

2022-11-09 Thread Tom Lane
Simon Riggs writes: > Karina's changes make sense to me, so +1. > This is a minor patch, so I will set this as Ready For Committer. Pushed with minor fiddling: * I concur with Karina's thought that ERRCODE_WRONG_OBJECT_TYPE is the most on-point errcode for this. The complaint is specifically ab

Re: Error for WITH options on partitioned tables

2022-11-07 Thread Simon Riggs
On Mon, 7 Nov 2022 at 08:55, Karina Litskevich wrote: > > Hi David, > > > I am not very clear about why `build_reloptions` is removed in patch > > `v2-0002-better-error-message-for-setting-parameters-for-p.patch`, if > > you can help explain would be great. > > "build_reloptions" parses "reloption

Re: Error for WITH options on partitioned tables

2022-11-07 Thread Karina Litskevich
Hi David, > I am not very clear about why `build_reloptions` is removed in patch > `v2-0002-better-error-message-for-setting-parameters-for-p.patch`, if > you can help explain would be great. "build_reloptions" parses "reloptions" and takes for it a list of allowed options defined by the 5th argu

Re: Error for WITH options on partitioned tables

2022-11-01 Thread Simon Riggs
Apologies, I only just noticed these messages. I have set WoA until I have read, understood and can respond to your detailed input, thanks. On Fri, 28 Oct 2022 at 22:21, David Zhang wrote: > > Hi Karina, > > I am not very clear about why `build_reloptions` is removed in patch > `v2-0002-better-er

Re: Error for WITH options on partitioned tables

2022-10-28 Thread David Zhang
Hi Karina, I am not very clear about why `build_reloptions` is removed in patch `v2-0002-better-error-message-for-setting-parameters-for-p.patch`, if you can help explain would be great. From my observation, it seems the WITH option has different behavior when creating partitioned table and

Re: Error for WITH options on partitioned tables

2022-10-14 Thread Karina Litskevich
Hi, Simon! The new error message looks better. But I believe it is better to use "parameters" instead of "options" as it is called "storage parameters" in the documentation. I also believe it is better to report error in partitioned_table_reloptions() (thanks to Japin Li for mentioning this functi

Re: Error for WITH options on partitioned tables

2022-09-16 Thread Japin Li
I wrote: > On Fri, 16 Sep 2022 at 20:13, Simon Riggs > 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

Re: Error for WITH options on partitioned tables

2022-09-16 Thread Japin Li
On Fri, 16 Sep 2022 at 20:13, Simon Riggs wrote: > Someone on general list recently complained that the error message > from trying to use options on a partitioned table was misleading, > which it definitely is: > > CREATE TABLE parted_col_comment (a int, b text) PARTITION BY LIST (a) > WITH (fi