Re: [Sender Address Forgery]Re: using expression syntax for partition bounds

2019-01-27 Thread Amit Langote
Hi Peter, On 2019/01/26 17:25, Peter Eisentraut wrote: > On 25/01/2019 16:19, Tom Lane wrote: >> Peter Eisentraut writes: >>> committed >> >> Some of the buildfarm members are having sort-ordering problems >> with this. Looks like you could work around it with different >> partition names

Re: using expression syntax for partition bounds

2019-01-26 Thread Peter Eisentraut
On 25/01/2019 16:19, Tom Lane wrote: > Peter Eisentraut writes: >> committed > > Some of the buildfarm members are having sort-ordering problems > with this. Looks like you could work around it with different > partition names (don't assume the relative sort order of > letters and digits).

Re: using expression syntax for partition bounds

2019-01-25 Thread Michael Paquier
On Sat, Jan 26, 2019 at 12:14:33PM +0900, Amit Langote wrote: > The describe lines are there just to show that the stored expessions are > not verbatim same as the input expressions, so it seemed an overkill to add > them for all of the partitions. I see, so per 7c079d7 this is the reason why

Re: using expression syntax for partition bounds

2019-01-25 Thread Amit Langote
Hi, On Sat, Jan 26, 2019 at 12:01 Michael Paquier wrote: > On Sat, Jan 26, 2019 at 03:14:51AM +0900, Amit Langote wrote: > > How about replacing \d+ list_parted with couple of \d on individual > > partitions, like in the attached? > > That would make it. Why just part_1 and part_3 though? It

Re: using expression syntax for partition bounds

2019-01-25 Thread Michael Paquier
On Sat, Jan 26, 2019 at 03:14:51AM +0900, Amit Langote wrote: > How about replacing \d+ list_parted with couple of \d on individual > partitions, like in the attached? That would make it. Why just part_1 and part_3 though? It looks more complete to add part_null and part_2 as well. -- Michael

Re: using expression syntax for partition bounds

2019-01-25 Thread Amit Langote
On Sat, Jan 26, 2019 at 12:19 AM Tom Lane wrote: > Peter Eisentraut writes: > > committed > > Some of the buildfarm members are having sort-ordering problems > with this. Looks like you could work around it with different > partition names (don't assume the relative sort order of > letters and

Re: using expression syntax for partition bounds

2019-01-25 Thread Tom Lane
Peter Eisentraut writes: > committed Some of the buildfarm members are having sort-ordering problems with this. Looks like you could work around it with different partition names (don't assume the relative sort order of letters and digits). regards, tom lane

Re: using expression syntax for partition bounds

2019-01-25 Thread Peter Eisentraut
On 24/01/2019 13:57, Amit Langote wrote: > The if (contain_var_clause(value)) block is new code, but I agree its > ereport should have parser_errposition just like other ereports in that > function. Fixed that in the attached. committed -- Peter Eisentraut

Re: using expression syntax for partition bounds

2019-01-24 Thread Amit Langote
Hi, Thanks for looking. On 2019/01/24 21:00, Alvaro Herrera wrote: > Why did you lose the parser_errposition in parse_utilcmd.c line 3854? > >> -/* Fail if we don't have a constant (i.e., non-immutable coercion) */ >> -if (!IsA(value, Const)) >> +/* Make sure the expression does not

Re: using expression syntax for partition bounds

2019-01-24 Thread Alvaro Herrera
Why did you lose the parser_errposition in parse_utilcmd.c line 3854? > - /* Fail if we don't have a constant (i.e., non-immutable coercion) */ > - if (!IsA(value, Const)) > + /* Make sure the expression does not refer to any vars. */ > + if (contain_var_clause(value)) >

Re: using expression syntax for partition bounds

2019-01-24 Thread Amit Langote
Horiguchi-san, Thanks for checking. On 2019/01/24 19:03, Kyotaro HORIGUCHI wrote: > At Fri, 18 Jan 2019 17:50:56 +0900, Amit Langote wrote: >> On 2019/01/18 16:48, Peter Eisentraut wrote: How about the following note in the documentation: + Although volatile expressions such

Re: using expression syntax for partition bounds

2019-01-24 Thread Kyotaro HORIGUCHI
Hello. At Fri, 18 Jan 2019 17:50:56 +0900, Amit Langote wrote in > Thanks for the comments. > > On 2019/01/18 16:48, Peter Eisentraut wrote: > >> How about the following note in the documentation: > >> > >> + Although volatile expressions such as > >> + CURRENT_TIMESTAMP can be >

Re: using expression syntax for partition bounds

2019-01-18 Thread Amit Langote
Thanks for the comments. On 2019/01/18 16:48, Peter Eisentraut wrote: >> How about the following note in the documentation: >> >> + Although volatile expressions such as >> + CURRENT_TIMESTAMP can be used >> + for this, be careful when using them, because >> + PostgreSQL will

Re: using expression syntax for partition bounds

2019-01-17 Thread Peter Eisentraut
On 16/01/2019 08:41, Amit Langote wrote: > OK, will change it back to partition_bound_expr. Removing "bound" from it > makes the term ambiguous? Yeah, let's leave it in. > How about the following note in the documentation: > > + Although volatile expressions such as > +

Re: using expression syntax for partition bounds

2019-01-15 Thread Amit Langote
Thanks for the review. On 2019/01/15 22:24, Peter Eisentraut wrote: > On 15/01/2019 07:31, Amit Langote wrote: >>> Is "partition bound" the right term? For list partitioning, it's not >>> really a bound. Maybe it's OK. >> >> Hmm, maybe "partition bound value"? Just want to stress that the >>

Re: using expression syntax for partition bounds

2019-01-15 Thread Peter Eisentraut
On 15/01/2019 07:31, Amit Langote wrote: >> Is "partition bound" the right term? For list partitioning, it's not >> really a bound. Maybe it's OK. > > Hmm, maybe "partition bound value"? Just want to stress that the > expression specifies "bounding" value of a partition. I was more concerned

Re: using expression syntax for partition bounds

2019-01-14 Thread Amit Langote
Thanks for the review and sorry it took me a while to reply. On 2019/01/02 22:58, Peter Eisentraut wrote: > On 26/11/2018 05:58, Amit Langote wrote: >> On 2018/11/09 14:38, Amit Langote wrote: >>> Rebased due to change in addRangeTableEntryForRelation's API. >> >> Rebased again due to changes in

Re: using expression syntax for partition bounds

2019-01-02 Thread Peter Eisentraut
On 26/11/2018 05:58, Amit Langote wrote: > On 2018/11/09 14:38, Amit Langote wrote: >> Rebased due to change in addRangeTableEntryForRelation's API. > > Rebased again due to changes in psql's describe output for partitioned tables. Review: Is "partition bound" the right term? For list

Re: using expression syntax for partition bounds

2018-11-25 Thread Amit Langote
On 2018/11/09 14:38, Amit Langote wrote: > Rebased due to change in addRangeTableEntryForRelation's API. Rebased again due to changes in psql's describe output for partitioned tables. Thanks, Amit >From 999aa53b459a6fc0fe899e613406f0e0035aca94 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi

Re: using expression syntax for partition bounds

2018-11-08 Thread Amit Langote
Rebased due to change in addRangeTableEntryForRelation's API. Thanks, Amit >From 2c9bd7d17abea93001c923ac200c560417cd39a1 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Fri, 6 Jul 2018 14:05:22 +0900 Subject: [PATCH v6] Allow generalized expression syntax for partition bounds Authors:

Re: using expression syntax for partition bounds

2018-07-05 Thread Amit Langote
Horiguchi-san, On 2018/07/06 14:26, Kyotaro HORIGUCHI wrote: > Hello. > > cf-bot compained on this but I wondered why it got so many > errors. At the first look I found a spare semicolon before a bare > then calause:p > >> -if (!IsA(value, Const)); >> +if (!IsA(value, Const)) >>

Re: using expression syntax for partition bounds

2018-07-05 Thread Kyotaro HORIGUCHI
Hello. cf-bot compained on this but I wondered why it got so many errors. At the first look I found a spare semicolon before a bare then calause:p > - if (!IsA(value, Const)); > + if (!IsA(value, Const)) > elog(ERROR, "could not evaluate partition bound expression"); The

Re: using expression syntax for partition bounds

2018-06-25 Thread Amit Langote
Horiguchi-san, Thanks a lot for the review and sorry it took me a while to reply. Thought I'd refresh the patch as it's in the July CF. On 2018/04/24 18:08, Kyotaro HORIGUCHI wrote: > Thanks. I have almost missed this. > > At Mon, 23 Apr 2018 11:44:14 +0900, Amit Langote wrote: >> On 2018/04/23

Re: using expression syntax for partition bounds

2018-04-24 Thread Kyotaro HORIGUCHI
Thanks. I have almost missed this. At Mon, 23 Apr 2018 11:44:14 +0900, Amit Langote wrote in > On 2018/04/23 11:37, Amit Langote wrote: > > I tried to update the patch to do things that way. I'm going to

Re: using expression syntax for partition bounds (was: Re: Boolean partitions syntax)

2018-04-22 Thread Amit Langote
On 2018/04/23 11:37, Amit Langote wrote: > I tried to update the patch to do things that way. I'm going to create a > new entry in the next CF titled "generalized expression syntax for > partition bounds" and add the patch there. Tweaked the commit message to credit all the authors. Thanks,

using expression syntax for partition bounds (was: Re: Boolean partitions syntax)

2018-04-22 Thread Amit Langote
(patch and discussion for PG 12) On 2018/04/22 1:28, Tom Lane wrote: > Amit Langote writes: >> [ v8-0001-Allow-generalized-expression-syntax-for-partition.patch ] > > I find what you did to a_expr here to be pretty horrid. Thanks for the review. > I think what