[Bucardo-general] "ERROR: 42883: could not identify an ordering operator for type polygon"

Joshua Tolley josh at endpoint.com
Tue Apr 28 22:19:29 UTC 2009


On Tue, Apr 28, 2009 at 03:58:47PM -0600, Joshua Tolley wrote:
> An interesting thought, though, might be that for cases like DISTINCT
> and GROUP BY, the ordering doesn't have to be particularly meaningful,
> as long as it's consistent -- i.e. equivalent polygons always end up in
> the same order in relation to each other. An intelligent equality
> operator paired with simple operators to, say, sort polygons based on
> the number of vertices, might suffice.

I knew it couldn't be that simple -- b-tree indexes also need a "support
function", which takes two values and returns an integer: -1 if the
first value is less than the second, 1 if the first value is greater
than the second, and 0 if they're equal. For "less than" and "greater
than" defined by number of vertices, it's easily possible for two
polygons to not be strictly less than or greater than each other, but
still not be equal. Bummer.

-- 
Josh Tolley  josh at endpoint.com  801-485-0203
End Point Corporation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090428/24753fdf/attachment.bin 


More information about the Bucardo-general mailing list