Re: Syntax for partitioning

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Syntax for partitioning
Date: 2009-11-17 20:09:26
Message-ID: 4B0302F6.9020808@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova wrote:
>> * If a table with the same name already exists when a partition
>> is created, the table is re-used as partition. This behavior
>> is required for pg_dump to be simple.
>>
>
> i guess the table must be empty, if not we should be throw an error...
> and i actually prefer some more explicit syntax for this not just
> reusing a table

I'd be OK with only a notification - even if the table wasn't empty -,
similar to how inheritance combines rows currently. The patch currently
silently reuses the table unless it has rows which don't satisfy the
CHECK constraint, in which case it gives you the default CHECK
constraint error.

>> PARTITION name VALUES LESS THAN { range_upper | MAXVALUE }
>> | PARTITION name VALUES IN ( list_value [,...] | DEFAULT )
>>
>
> i remember someone making a comment about actually using operators
> instead of LESS THEN and family

That doesn't sound like a bad idea..

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-11-17 20:14:20 Re: actualised funcs typmod patch
Previous Message Pavel Stehule 2009-11-17 20:04:03 plpgsql: open for execute - add USING clause