Re: [GENERAL] GiST: Need ideas on how to minimise data in a GiST index - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] GiST: Need ideas on how to minimise data in a GiST index
Date
Msg-id 12891.1048520057@sss.pgh.pa.us
Whole thread Raw
In response to GiST: Need ideas on how to minimise data in a GiST index  ("Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk>)
List pgsql-hackers
"Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk> writes:
> However, each database column also has a spatial reference system
> identifier (SRID) that specifies the coordinate system the geometry is
> in. What should happen is that given two geometries or bounding boxes,
> an error should be generated whenever the SRIDs do not match.

Offhand I'm not sure why you think the index should solve this.  It
seems more like grist for a CHECK constraint applied to the table.

One way to attack it without bloating the index is to consider the index
as lossy, meaning that the actual geometric operator must be reapplied
on each row identified by the index.  Then the operator can compare
SRIDs, but you need not store SRIDs in the index.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A bad behavior under autocommit off mode
Next
From: "Mark Cave-Ayland"
Date:
Subject: Re: [GENERAL] GiST: Need ideas on how to minimise data in a GiST index