On 2016/06/21 16:49, Ashutosh Bapat wrote: > Hi Amit, > I tried creating partitioned table by range on an expression like > CREATE TABLE pt1_e (a int, b int, c varchar) PARTITION BY RANGE(a + > b); > ERROR: syntax error at or near > "+" > > LINE 1: ...E pt1_e (a int, b int, c varchar) PARTITION BY RANGE(a + b); > > But when I try to create partitioned table by range on expression chr(a) it > works.
The expression needs to be parenthesized (function call expressions don't need though). So something like the following would work: CREATE TABLE pt1_e (a int, b int, c varchar) PARTITION BY RANGE(add(a, b)); Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers