Re: [HACKERS] RangeType internal use

2015-02-14 Thread Jim Nasby
On 2/13/15 3:34 PM, David Fetter wrote: On Fri, Feb 13, 2015 at 03:13:11PM -0600, Jim Nasby wrote: On 2/10/15 2:04 PM, David Fetter wrote: Yeah, but people expect to be able to partition on ranges that are not all of equal width. I think any proposal that we shouldn't support that is the kiss

Re: [HACKERS] RangeType internal use

2015-02-13 Thread Jim Nasby
On 2/10/15 2:04 PM, David Fetter wrote: Yeah, but people expect to be able to partition on ranges that are not all of equal width. I think any proposal that we shouldn't support that is the kiss of death for a feature like this - it will be so restricted as to eliminate 75% of the use

Re: [HACKERS] RangeType internal use

2015-02-13 Thread Mike Blackwell
On Fri, Feb 13, 2015 at 3:13 PM, Jim Nasby jim.na...@bluetreble.com wrote: If we exclude the issue of needing one or two oddball partitions for +/- infinity, I expect that fixed sized partitions would actually cover 80-90% of cases. ​That would not be true in our case. The data is not at

Re: [HACKERS] RangeType internal use

2015-02-13 Thread David Fetter
On Fri, Feb 13, 2015 at 03:13:11PM -0600, Jim Nasby wrote: On 2/10/15 2:04 PM, David Fetter wrote: Yeah, but people expect to be able to partition on ranges that are not all of equal width. I think any proposal that we shouldn't support that is the kiss of death for a feature like this -

Re: [HACKERS] RangeType internal use

2015-02-10 Thread Robert Haas
On Mon, Feb 9, 2015 at 7:54 PM, Amit Langote langote_amit...@lab.ntt.co.jp wrote: Well, that's debatable IMO (especially your claim that variable-size partitions would be needed by a majority of users). But in any case, partitioning behavior that is emergent from a bunch of independent pieces

Re: [HACKERS] RangeType internal use

2015-02-10 Thread David Fetter
On Mon, Feb 09, 2015 at 12:37:05PM -0500, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Feb 9, 2015 at 10:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: It's going to be complicated and probably buggy, and I think it is heading in the wrong direction altogether. If you want

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: On 02/09/2015 03:21 AM, Tom Lane wrote: Meh. I don't care for that much --- it sounds a lot like deciding that your problem is a nail because there is a hammer within reach. A random collection of ranges doesn't seem like a very appropriate

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Tom Lane
Amit Langote langote_amit...@lab.ntt.co.jp writes: Okay, let me back up a little and think about your suggestion which I do not seem to understand very well - it raises a few questions for me: does this mean a partitioning criteria is associated with parent (partitioned table) rather than each

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Robert Haas
On Mon, Feb 9, 2015 at 10:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: It's going to be complicated and probably buggy, and I think it is heading in the wrong direction altogether. If you want to partition in some arbitrary complicated fashion that the system can't reason about very effectively,

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Feb 9, 2015 at 10:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: It's going to be complicated and probably buggy, and I think it is heading in the wrong direction altogether. If you want to partition in some arbitrary complicated fashion that the

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Robert Haas
On Mon, Feb 9, 2015 at 12:37 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Feb 9, 2015 at 10:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: It's going to be complicated and probably buggy, and I think it is heading in the wrong direction altogether. If

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Noah Misch
On Mon, Feb 09, 2015 at 12:37:05PM -0500, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: Yeah, but people expect to be able to partition on ranges that are not all of equal width. I think any proposal that we shouldn't support that is the kiss of death for a feature like this -

Re: [HACKERS] RangeType internal use

2015-02-09 Thread Amit Langote
On 10-02-2015 AM 02:37, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Feb 9, 2015 at 10:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: It's going to be complicated and probably buggy, and I think it is heading in the wrong direction altogether. If you want to partition in some

Re: [HACKERS] RangeType internal use

2015-02-08 Thread Heikki Linnakangas
On 02/09/2015 03:21 AM, Tom Lane wrote: Amit Langote langote_amit...@lab.ntt.co.jp writes: On 07-02-2015 AM 12:10, Tom Lane wrote: There is no good reason to assume that a range type exists at all, much less that it is unique for a subtype. (Read the CREATE TYPE documentation if you're

Re: [HACKERS] RangeType internal use

2015-02-08 Thread Amit Langote
On 09-02-2015 AM 10:21, Tom Lane wrote: Meh. I don't care for that much --- it sounds a lot like deciding that your problem is a nail because there is a hammer within reach. A random collection of ranges doesn't seem like a very appropriate representation to me; first because there is no

Re: [HACKERS] RangeType internal use

2015-02-08 Thread Amit Langote
On 07-02-2015 AM 12:10, Tom Lane wrote: Amit Langote langote_amit...@lab.ntt.co.jp writes: I wonder why I cannot find a way to get a range type for a given (sub-) type. I would like to build a RangeType from Datum's of lower and upper bounds. Much like how construct_array() builds an ArrayType

Re: [HACKERS] RangeType internal use

2015-02-08 Thread Tom Lane
Amit Langote langote_amit...@lab.ntt.co.jp writes: On 07-02-2015 AM 12:10, Tom Lane wrote: There is no good reason to assume that a range type exists at all, much less that it is unique for a subtype. (Read the CREATE TYPE documentation if you're unclear as to why not.) You have not said

Re: [HACKERS] RangeType internal use

2015-02-06 Thread Tom Lane
Amit Langote langote_amit...@lab.ntt.co.jp writes: I wonder why I cannot find a way to get a range type for a given (sub-) type. I would like to build a RangeType from Datum's of lower and upper bounds. Much like how construct_array() builds an ArrayType from a Datum array of elements given

Re: [HACKERS] RangeType internal use

2015-02-05 Thread Kyotaro HORIGUCHI
Hi, from nearby:) I wonder why I cannot find a way to get a range type for a given (sub-) type. I would like to build a RangeType from Datum's of lower and upper bounds. Much like how construct_array() builds an ArrayType from a Datum array of elements given elements' type info. Is there

Re: [HACKERS] RangeType internal use

2015-02-05 Thread Amit Langote
Horiguchi-san, On 06-02-2015 PM 04:34, Kyotaro HORIGUCHI wrote: Hi, from nearby:) Thank you! I wonder why I cannot find a way to get a range type for a given (sub-) type. I would like to build a RangeType from Datum's of lower and upper bounds. Much like how construct_array() builds an

[HACKERS] RangeType internal use

2015-02-05 Thread Amit Langote
Hi, I wonder why I cannot find a way to get a range type for a given (sub-) type. I would like to build a RangeType from Datum's of lower and upper bounds. Much like how construct_array() builds an ArrayType from a Datum array of elements given elements' type info. Is there some way I do not