Re: Cube extension point support // GSoC'13 - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Cube extension point support // GSoC'13
Date
Msg-id CAPpHfdstQGbDdd=a9i_MUA0t_xfkHzktazKYcguwOxM4=w1BMQ@mail.gmail.com
Whole thread Raw
In response to Cube extension point support // GSoC'13  (Stas Kelvich <stas.kelvich@gmail.com>)
List pgsql-hackers

On Fri, Jul 12, 2013 at 3:57 PM, Stas Kelvich <stas.kelvich@gmail.com> wrote:
Hello.

here is a patch adding to cube extension support for compressed representation of point cubes. If cube is a point, i.e. has coincident lower left and upper right corners, than only one corner is stored. First bit of the cube header indicates whether the cube is point or not. Few moments:

* Patch preserves binary compatibility with old indices

New representation of points will work in both index and heap. So, we should speak about just compatibility with old cubes. 
 
* All functions that create cubes from user input, check whether it is a point or not
* All internal functions that can return cubes takes care of all cases where a cube might become a point
* Added tests for checking correct point behavior

Also this patch includes adapted Alexander Korotkov's patch with kNN-based ordering operator, which he wrote for postgresql-9.0beta1 with knngist patch. More info there http://www.postgresql.org/message-id/AANLkTimhFaq6hCibRnk0tlcQMIyhYWHwAQ2ZD87wbH86@mail.gmail.com

I think ordering operator should be extracted into separated patch together with another ordering operators of your project.


Patch contains some formatting issues. For example, this comment

/* Point can arise in two cases:
   1) When argument is point and r == 0
   2) When all coordinates was set to their averages */

should contain star sign on the beginning of each line. Also it will be reflowed by pgindent. Correct formatting for this comment should look like this:

/*--------------------------------------------------
 * Point can arise in two cases:
 * 1) When argument is point and r == 0
 * 2) When all coordinates was set to their averages
 */

See coding convention for details:

------
With best regards,
Alexander Korotkov.

pgsql-hackers by date:

Previous
From: "Erik Rijkers"
Date:
Subject: Re: Adding optionally commit number in PG_VERSION_STR
Next
From: Dave Page
Date:
Subject: Re: Adding optionally commit number in PG_VERSION_STR