Re: [HACKERS] Syntax for partitioning

2011-11-16 Thread Dimitri Fontaine
Martijn van Oosterhout writes: > That said, I still don't see how you can enforce a unique index over > multiple segments over something other than the partition key while > still allowing quick dropping of segments. If you can fix that you can > make it work for the current inheritence-style par

Re: [HACKERS] Syntax for partitioning

2011-11-14 Thread Martijn van Oosterhout
On Mon, Nov 14, 2011 at 10:33:36AM +0100, Dimitri Fontaine wrote: > Martijn van Oosterhout writes: > > While I agree that explicit partitioning is somewhat of a hack, it's a > > really useful hack. But for me the most important use of partitioning > > is "dropping a billion rows efficiently and g

Re: [HACKERS] Syntax for partitioning

2011-11-14 Thread Dimitri Fontaine
Martijn van Oosterhout writes: > While I agree that explicit partitioning is somewhat of a hack, it's a > really useful hack. But for me the most important use of partitioning > is "dropping a billion rows efficiently and getting the disk space > back". And the biggest problem is always that dro

Re: [HACKERS] Syntax for partitioning

2011-11-14 Thread Dimitri Fontaine
Tom Lane writes: > to match the desired granularity of data removal. I don't really see > any way that the database can be expected to know what that is, unless > it's told in advance. So AFAICS you really have to have a declarative > way of telling it how to do the partitioning --- it's not goi

Re: [HACKERS] Syntax for partitioning

2011-11-12 Thread Tom Lane
Martijn van Oosterhout writes: > While I agree that explicit partitioning is somewhat of a hack, it's a > really useful hack. But for me the most important use of partitioning > is "dropping a billion rows efficiently and getting the disk space > back". Right. The only way to make that speedy i

Re: [HACKERS] Syntax for partitioning

2011-11-12 Thread Martijn van Oosterhout
On Thu, Nov 10, 2011 at 10:19:02PM +0100, Dimitri Fontaine wrote: > Now the aim would be to be able to implement the operation you describe > by using the new segment map, which is an index pointing to sequential > ranges of on-disk blocks where the data is known to share a common key > range over

Re: [HACKERS] Syntax for partitioning

2011-11-10 Thread Daniel Farina
On Thu, Nov 10, 2011 at 1:19 PM, Dimitri Fontaine wrote: > Now the aim would be to be able to implement the operation you describe > by using the new segment map, which is an index pointing to sequential > ranges of on-disk blocks where the data is known to share a common key > range over the colu

Re: [HACKERS] Syntax for partitioning

2011-11-10 Thread Dimitri Fontaine
Jeff Janes writes: > shouldn't it need a DBA to declare it? How is the system supposed to > anticipate that at some point years in the future I will want to run > the command sequence "create foo_archive as select from foo where > year<2009; delete from foo where year<2009", or its partition-base

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Jeff Janes
On Wed, Nov 9, 2011 at 1:05 PM, Dimitri Fontaine wrote: > Thom Brown writes: >> Whenever I cross the topic of >> partitioning in PostgreSQL, it's always a tad embarrassing to explain >> that it's still hacky compared to other database systems (and this >> came up again last week), so this is of p

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Greg Smith
On 11/09/2011 04:05 PM, Dimitri Fontaine wrote: The more I think about this problem, the more I think that the reason why we still don't have declarative partitioning is that it basically sucks. I think that we don't have it because no one has ever dumped the much larger than might be expected

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Thom Brown
On 9 November 2011 21:05, Dimitri Fontaine wrote: > Thom Brown writes: >> Whenever I cross the topic of >> partitioning in PostgreSQL, it's always a tad embarrassing to explain >> that it's still hacky compared to other database systems (and this >> came up again last week), so this is of particu

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Dimitri Fontaine
Thom Brown writes: > Whenever I cross the topic of > partitioning in PostgreSQL, it's always a tad embarrassing to explain > that it's still hacky compared to other database systems (and this > came up again last week), so this is of particular interest to me. At The more I think about this prob

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Thom Brown
On 9 November 2011 15:15, Robert Haas wrote: > On Wed, Nov 9, 2011 at 9:35 AM, Jaime Casanova wrote: >> On Wed, Nov 9, 2011 at 8:26 AM, Thom Brown wrote: >>> >>> So will this be revived any time soon?  Were there any subsequent >>> proposals which were posted? >>> >> >> there was an updated patc

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Robert Haas
On Wed, Nov 9, 2011 at 9:35 AM, Jaime Casanova wrote: > On Wed, Nov 9, 2011 at 8:26 AM, Thom Brown wrote: >> >> So will this be revived any time soon?  Were there any subsequent >> proposals which were posted? >> > > there was an updated patch, you can find in this thread: > http://archives.postg

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Jaime Casanova
On Wed, Nov 9, 2011 at 8:26 AM, Thom Brown wrote: > > So will this be revived any time soon?  Were there any subsequent > proposals which were posted? > there was an updated patch, you can find in this thread: http://archives.postgresql.org/message-id/20100114181323.9a33.52131...@oss.ntt.co.jp n

Re: [HACKERS] Syntax for partitioning

2011-11-09 Thread Thom Brown
On 15 December 2009 02:31, Jaime Casanova wrote: > On Mon, Dec 14, 2009 at 7:29 PM, Simon Riggs wrote: >> On Fri, 2009-12-04 at 09:00 +, Simon Riggs wrote: >>> On Fri, 2009-12-04 at 11:54 +0900, Itagaki Takahiro wrote: >>> > Here is an update partitioning syntax patch. >>> > >>> > A bug repor

Re: [HACKERS] Syntax for partitioning

2009-12-14 Thread Jaime Casanova
On Mon, Dec 14, 2009 at 7:29 PM, Simon Riggs wrote: > On Fri, 2009-12-04 at 09:00 +, Simon Riggs wrote: >> On Fri, 2009-12-04 at 11:54 +0900, Itagaki Takahiro wrote: >> > Here is an update partitioning syntax patch. >> > >> > A bug reported by Marko is fixed. >> >> I will review and eventually

Re: [HACKERS] Syntax for partitioning

2009-12-14 Thread Simon Riggs
On Fri, 2009-12-04 at 09:00 +, Simon Riggs wrote: > On Fri, 2009-12-04 at 11:54 +0900, Itagaki Takahiro wrote: > > Here is an update partitioning syntax patch. > > > > A bug reported by Marko is fixed. > > I will review and eventually commit this, if appropriate, though it is > 3rd in my queu

Re: [HACKERS] Syntax for partitioning

2009-12-06 Thread Itagaki Takahiro
Greg Smith wrote: > I've marked Simon as the next reviewer and expected committer on this > patch and have updated it to "Returned with Feedback". OK. I'll re-submit improved patches in the next commit fest. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-h

Re: [HACKERS] Syntax for partitioning

2009-12-06 Thread Greg Smith
Simon Riggs wrote: I will review and eventually commit this, if appropriate, though it is 3rd in my queue and will probably not be done for at least 2 weeks, possibly 4 weeks. I've marked Simon as the next reviewer and expected committer on this patch and have updated it to "Returned with Fee

Re: [HACKERS] Syntax for partitioning

2009-12-04 Thread Simon Riggs
On Fri, 2009-12-04 at 11:54 +0900, Itagaki Takahiro wrote: > Here is an update partitioning syntax patch. > > A bug reported by Marko is fixed. I will review and eventually commit this, if appropriate, though it is 3rd in my queue and will probably not be done for at least 2 weeks, possibly 4 wee

Re: [HACKERS] Syntax for partitioning

2009-11-24 Thread Itagaki Takahiro
Emmanuel Cecchet wrote: > Should we add the 'WITH (...) TABLESPACE tbs' options to the syntax > since they are supported? Added the description. > Do we support ALTER ... SET TABLESPACE? DROP/ALTER PARTITION are synonyms for DROP/ALTER TABLE. SET TABLESPACE is also supported. Added the descr

Re: [HACKERS] Syntax for partitioning

2009-11-24 Thread Emmanuel Cecchet
Greg Smith wrote: I just made a few updates to http://wiki.postgresql.org/wiki/Table_partitioning , merging in the stuff that had been on the ToDo page and expanding the links to discussion on this list a bit. The number of submitted patches over the last couple of years that handle some subs

Re: [HACKERS] Syntax for partitioning

2009-11-24 Thread Greg Smith
I just made a few updates to http://wiki.postgresql.org/wiki/Table_partitioning , merging in the stuff that had been on the ToDo page and expanding the links to discussion on this list a bit. The number of submitted patches over the last couple of years that handle some subset of the desired f

Re: [HACKERS] Syntax for partitioning

2009-11-24 Thread Itagaki Takahiro
Emmanuel Cecchet wrote: > I think that other databases allows the > user to define a tablespace for each partition in the create table > statement. WITH and TABLESPACE clause are supported for each partition. =# CREATE TABLE parent (...) PARTITION BY (key) ( PARTITION child_1 VALU

Re: [HACKERS] Syntax for partitioning

2009-11-24 Thread Emmanuel Cecchet
Hi, Sorry for commenting only now but I think that we need to be able to store the partitions in different tablespaces. Even if originally the create table creates all partitions in the same tablespace, individual partitions should be allowed to be moved in different tablespaces using alter t

Re: [HACKERS] Syntax for partitioning

2009-11-20 Thread Robert Haas
On Fri, Nov 20, 2009 at 2:08 AM, Simon Riggs wrote: > On Thu, 2009-11-19 at 10:53 -0500, Robert Haas wrote: >> On Thu, Nov 19, 2009 at 9:58 AM, Markus Wanner wrote: >> > Hi, >> > >> > Robert Haas wrote: >> >> >> >> Settling on a syntax, and an internal representation for that syntax, >> > >> > I'

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Simon Riggs
On Thu, 2009-11-19 at 10:53 -0500, Robert Haas wrote: > On Thu, Nov 19, 2009 at 9:58 AM, Markus Wanner wrote: > > Hi, > > > > Robert Haas wrote: > >> > >> Settling on a syntax, and an internal representation for that syntax, > > > > I've been under the impression that this was only about syntax. W

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Tom Lane
Peter Eisentraut writes: > 2) I would prefer that you apply sizeof on the variable, not on the > type. That way, the expression is independent of any type changes of > the variable, and can be reviewed without having to scroll around for > the variable definition. FWIW, I think the general proje

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Tom Lane
Nikhil Sontakke writes: >>> partinfo = (PartitionInfo *) malloc(ntups * sizeof(PartitionInfo)); >> >> 1) Please stop casting the results of palloc and malloc.  We are not >> writing C++ here. > I thought it was/is a good C programming practice to typecast (void *) > always to the returning struc

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Peter Eisentraut
On fre, 2009-11-20 at 11:14 +0530, Nikhil Sontakke wrote: > Hi, > > >> > partinfo = (PartitionInfo *) malloc(ntups * sizeof(PartitionInfo)); > > > > 1) Please stop casting the results of palloc and malloc. We are not > > writing C++ here. > > > > I thought it was/is a good C programming practice

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Nikhil Sontakke
Hi, >> > partinfo = (PartitionInfo *) malloc(ntups * sizeof(PartitionInfo)); > > 1) Please stop casting the results of palloc and malloc.  We are not > writing C++ here. > I thought it was/is a good C programming practice to typecast (void *) always to the returning structure type!! Regards, Nik

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Peter Eisentraut
On ons, 2009-11-18 at 13:52 +0900, Itagaki Takahiro wrote: > > partinfo = (PartitionInfo *) malloc(ntups * sizeof(PartitionInfo)); > > Oops, it should be "p"alloc. Thanks. A very low-level comment: 1) Please stop casting the results of palloc and malloc. We are not writing C++ here. 2) I would

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Robert Haas
On Thu, Nov 19, 2009 at 9:58 AM, Markus Wanner wrote: > Hi, > > Robert Haas wrote: >> >> Settling on a syntax, and an internal representation for that syntax, > > I've been under the impression that this was only about syntax. What are the > internal additions? I haven't looked at it in detail, b

Re: [HACKERS] Syntax for partitioning

2009-11-19 Thread Markus Wanner
Hi, Robert Haas wrote: Settling on a syntax, and an internal representation for that syntax, I've been under the impression that this was only about syntax. What are the internal additions? Generally speaking, I'd agree with Simon or even vote for doing the internals first and add the synt

Re: [HACKERS] Syntax for partitioning

2009-11-18 Thread Simon Riggs
On Wed, 2009-11-18 at 13:24 +0900, Itagaki Takahiro wrote: > Simon Riggs wrote: > > > Why not just wait until we have a whole patch and then apply? > > "A whole patch" can be written by many contributers instead of only > one person, no? I think we need to split works for partitioning > into se

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Itagaki Takahiro
Marko Tiikkaja wrote: > this looks like a mistake: > partinfo = (PartitionInfo *) malloc(ntups * sizeof(PartitionInfo)); Oops, it should be "p"alloc. Thanks. > Maybe we should use something like > PARTITION bar VALUES OPERATOR 0 > when the user specifies the operator? I think we could have rea

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Itagaki Takahiro
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 pr

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Itagaki Takahiro
Simon Riggs wrote: > Why not just wait until we have a whole patch and then apply? "A whole patch" can be written by many contributers instead of only one person, no? I think we need to split works for partitioning into serveral parts to encourage developing it. I just did one of the parts, "s

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Itagaki Takahiro
Marko Tiikkaja wrote: > Jaime Casanova wrote: > >> 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 >

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Robert Haas
On Tue, Nov 17, 2009 at 4:31 PM, Simon Riggs wrote: > On Thu, 2009-10-29 at 11:15 +0900, Itagaki Takahiro wrote: > >> I think syntax support is a good start. > > I don't see a syntax-only patch as being any use at all to this > community. > > We go to enormous lengths in other areas to never allow

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Simon Riggs
On Thu, 2009-10-29 at 11:15 +0900, Itagaki Takahiro wrote: > I think syntax support is a good start. I don't see a syntax-only patch as being any use at all to this community. We go to enormous lengths in other areas to never allow patches with restrictions. Why would we allow a patch that is es

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Marko Tiikkaja
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

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Jaime Casanova
On Thu, Nov 12, 2009 at 5:54 AM, Itagaki Takahiro wrote: > I added psql and pg_dump support to Partitioning Syntax patch. > Paritioning information can be retrieved with a new system function > pg_get_partitiondef(parentRelid). Both psql and pg_dump use it. > i haven't seen the patch but: > >  *

Re: [HACKERS] Syntax for partitioning

2009-11-17 Thread Marko Tiikkaja
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

Re: [HACKERS] Syntax for partitioning

2009-11-01 Thread Nikhil Sontakke
Hi, >> Is this the same as / similar to Oracle's syntax? > > Yes. > >> IIRC Nikhil's patch was Oracle's syntax > > No. See: > http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_7002.htm#i2125922 > Any decent prevalent partitioning syntax should be ok IMHO. IIRC, MySQL parit

Re: [HACKERS] Syntax for partitioning

2009-11-01 Thread Itagaki Takahiro
Devrim GNDZ wrote: > Is this the same as / similar to Oracle's syntax? Yes. > IIRC Nikhil's patch was Oracle's syntax No. See: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_7002.htm#i2125922 Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sen

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Tom Lane
Robert Haas writes: > IMO, the real problem is that the type interface is poorly > encapsulated. There's way too much code that knows about the internal > details of a type - namely, that it's a 32-bit integer modified by a > second 32-bit integer. I think there are still places where the code >

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Jeff Davis
On Fri, 2009-10-30 at 17:39 -0400, Robert Haas wrote: > IMO, the real problem is that the type interface is poorly > encapsulated. There's way too much code that knows about the internal > details of a type - namely, that it's a 32-bit integer modified by a > second 32-bit integer. I think there

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Robert Haas
On Fri, Oct 30, 2009 at 5:16 PM, Tom Lane wrote: > Jeff Davis writes: >> I haven't looked at all of these places yet, so maybe a few simple >> changes would allow us to treat typmod as a full 32 bits. Or perhaps it >> could just be expanded to a signed 64-bit int. What do you think? > > Neither i

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Tom Lane
Jeff Davis writes: > I haven't looked at all of these places yet, so maybe a few simple > changes would allow us to treat typmod as a full 32 bits. Or perhaps it > could just be expanded to a signed 64-bit int. What do you think? Neither is likely to happen, and even disregarding that, I doubt pe

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Stephen Frost
* Jeff Davis (pg...@j-davis.com) wrote: > Oid is unsigned, typmod is signed. We might be able to get away with it, > but -1 is treated specially in some places outside of the type-specific > functions, e.g. exprTypmod(). Any negative result returned from the input handling function is considered a

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Jeff Davis
On Fri, 2009-10-30 at 19:12 +0200, Heikki Linnakangas wrote: > Wait, it doesn't? A typmod is a 32-bit integer, like Oids. Am I missing > something? Oid is unsigned, typmod is signed. We might be able to get away with it, but -1 is treated specially in some places outside of the type-specific funct

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Heikki Linnakangas
Jeff Davis wrote: > On Fri, 2009-10-30 at 10:03 +0200, Peter Eisentraut wrote: >> I can't help but wonder if the period type might better be a generic >> container for pairs of scalar, totally-ordered types. > > That would be ideal. However, it doesn't really look like our type > system was built

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread pg
>> PARTITION BY RANGE ( a_expr ) >> ... >> PARTITION BY HASH ( a_expr ) >> PARTITIONS num_partitions; > Unless someone comes up with a maintenance plan for stable hashfunctions, we > should probably not dare look into this yet. What would cover the common use case of per-day quals and drops ove

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Jeff Davis
On Fri, 2009-10-30 at 10:03 +0200, Peter Eisentraut wrote: > I can't help but wonder if the period type might better be a generic > container for pairs of scalar, totally-ordered types. That would be ideal. However, it doesn't really look like our type system was built to handle that kind of thing

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Devrim GÜNDÜZ
On Thu, 2009-10-29 at 11:15 +0900, Itagaki Takahiro wrote: > I'd like to improve partitioning feature in 8.5. Nice. > Here is syntax I propose: Is this the same as / similar to Oracle's syntax? IIRC Nikhil's patch was Oracle's syntax, and I prefer having that one instead of inventing our own

Re: [HACKERS] Syntax for partitioning

2009-10-30 Thread Peter Eisentraut
On Thu, 2009-10-29 at 15:19 -0700, Jeff Davis wrote: > I can't help but wonder if the PERIOD type might be better for > representing a partition range. It would make it easier to express and > enforce the constraint that no two partition ranges overlap ;) I can't help but wonder if the period type

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Itagaki Takahiro
Greg Stark wrote: > >> * ALTER TABLE ... DROP [COLUMN] name [CASCADE | RESTRICT] > >> * ALTER TABLE ... DROP PARTITION name [CASCADE | RESTRICT] > > Do we need a DROP PARTITION command at all? What would it even do? Currently no. So, it would be good to treat PARTITION as just a synonym of TA

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Greg Stark
On Thu, Oct 29, 2009 at 7:14 PM, Robert Haas wrote: >> CREATE TABLE does not require PARTITION to be a reserved keyword, >> but there are conflicts in ALTER TABLE ADD/DROP PARTITION: >> >>  * ALTER TABLE ... DROP [COLUMN]  name [CASCADE | RESTRICT] >>  * ALTER TABLE ... DROP PARTITION name [CASCAD

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Itagaki Takahiro
Peter Eisentraut wrote: > On tor, 2009-10-29 at 11:15 +0900, Itagaki Takahiro wrote: > > Range partitioning: > > CREATE TABLE table_name ( columns ) > > PARTITION BY RANGE ( a_expr ) > > ( > > PARTITION name VALUES LESS THAN [(] const [)], > > PARTITION name VALUES LESS THA

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Robert Haas
On Thu, Oct 29, 2009 at 9:51 PM, Itagaki Takahiro wrote: > > Heikki Linnakangas wrote: > >> > The keyword "PARTITION" is >> > added to the full-reserved keyword list to support ADD/DROP PARTITION. >> >> Any chance to avoid that? PARTITION seems like something people might >> well use as a column

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Itagaki Takahiro
Heikki Linnakangas wrote: > > The keyword "PARTITION" is > > added to the full-reserved keyword list to support ADD/DROP PARTITION. > > Any chance to avoid that? PARTITION seems like something people might > well use as a column or variable name. OTOH, it is reserved in SQL2008 > and SQL2003.

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Jeff Davis
On Fri, 2009-10-30 at 00:10 +0200, Peter Eisentraut wrote: > On tor, 2009-10-29 at 11:15 +0900, Itagaki Takahiro wrote: > > Range partitioning: > > CREATE TABLE table_name ( columns ) > > PARTITION BY RANGE ( a_expr ) > > ( > > PARTITION name VALUES LESS THAN [(] const [)], > >

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Peter Eisentraut
On tor, 2009-10-29 at 11:15 +0900, Itagaki Takahiro wrote: > Range partitioning: > CREATE TABLE table_name ( columns ) > PARTITION BY RANGE ( a_expr ) > ( > PARTITION name VALUES LESS THAN [(] const [)], > PARTITION name VALUES LESS THAN [(] MAXVALUE [)] -- overflow partition

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Andres Freund
On Thursday 29 October 2009 18:33:22 Greg Stark wrote: > On Thu, Oct 29, 2009 at 3:35 AM, Nikhil Sontakke > > wrote: > > So +1 on solidifying the syntax first and then sorting out the other > > minute, intricate details later.. > > I like that idea as well but I have a concern. What will we do w

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Greg Stark
On Thu, Oct 29, 2009 at 3:35 AM, Nikhil Sontakke wrote: > So +1 on solidifying the syntax first and then sorting out the other > minute, intricate details later.. I like that idea as well but I have a concern. What will we do with pg_dump. If the PARTITION commands are just syntactic sugar for cr

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Heikki Linnakangas
Itagaki Takahiro wrote: > The keyword "PARTITION" is > added to the full-reserved keyword list to support ADD/DROP PARTITION. Any chance to avoid that? PARTITION seems like something people might well use as a column or variable name. OTOH, it is reserved in SQL2008 and SQL2003. -- Heikki Linn

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Grzegorz Jaskiewicz
On 29 Oct 2009, at 02:15, Itagaki Takahiro wrote: I'd like to improve partitioning feature in 8.5. Kedar-san's previous work is wonderful, but I cannot see any updated patch. http://archives.postgresql.org/message-id/bd8134a40906080702s96c90a9q3bbb581b9bd0d...@mail.gmail.com So, I'll take o

Re: [HACKERS] Syntax for partitioning

2009-10-29 Thread Nikhil Sontakke
Hi, > So, I'll take over the work if there are no ones to do it. > I'm thinking to add syntax support first. Table partitioning was > proposed many times, but it is still not applied into core. > The reason is it is too difficult to make perfect partitioning > feature at once. I think syntax suppo

Re: [HACKERS] Syntax for partitioning

2009-10-28 Thread Pavel Stehule
2009/10/29 Itagaki Takahiro : > I'd like to improve partitioning feature in 8.5. > Kedar-san's previous work is wonderful, but I cannot see any updated patch. > http://archives.postgresql.org/message-id/bd8134a40906080702s96c90a9q3bbb581b9bd0d...@mail.gmail.com > > So, I'll take over the work if th

[HACKERS] Syntax for partitioning

2009-10-28 Thread Itagaki Takahiro
I'd like to improve partitioning feature in 8.5. Kedar-san's previous work is wonderful, but I cannot see any updated patch. http://archives.postgresql.org/message-id/bd8134a40906080702s96c90a9q3bbb581b9bd0d...@mail.gmail.com So, I'll take over the work if there are no ones to do it. I'm thinking