Re: Syntax for partitioning - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Syntax for partitioning
Date
Msg-id 4B02FA74.8090607@cs.helsinki.fi
Whole thread Raw
In response to Re: Syntax for partitioning  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Syntax for partitioning
List pgsql-hackers
Hi,

I'm reviewing your patch.  The patch applies without problems and the
feature works as advertised.  I have yet to look at the code in detail,
but it looks sane and seems to work.  However, this looks like a mistake:

partinfo = (PartitionInfo *) malloc(ntups * sizeof(PartitionInfo));

or am I missing something?


The syntax itself seems a bit weird in some cases.  Say you have:
PARTITION BY RANGE ( foo USING > )
(PARTITION bar VALUES LESS THAN 0
);

which translates to CHECK (bar > 0).  That doesn't sound at all like
LESS THAN to me.  This syntax seems to be the same Oracle uses, and I
think it's nice for the general case, but I think the reversed operator
weirdness is a bit too much.  Maybe we should use something like

PARTITION bar VALUES OPERATOR 0

when the user specifies the operator?


Regards,
Marko Tiikkaja



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: actualised funcs typmod patch
Next
From: Jaime Casanova
Date:
Subject: Re: Syntax for partitioning