Re: Syntax for partitioning

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Syntax for partitioning
Date: 2009-11-17 19:33:08
Message-ID: 4B02FA74.8090607@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2009-11-17 19:46:01 Re: Syntax for partitioning
Previous Message Tom Lane 2009-11-17 19:33:07 Re: actualised funcs typmod patch