[postgis-users] dropping bboxes doesn't work ?!

Markus Schaber schabi at logix-tt.com
Mon Oct 17 03:35:48 PDT 2005

Hi, Ronald,

R. Müller wrote:

>> [...]
>> Could you try
>> UPDATE geotable SET geom=dropbbox(geom);
>> and tell us whether your problem remains?
> thanks a lot, it works .... ;-)
> but in this case it shouldn't it work for the select-query as well ?
> the bbox is not a value, which is directly stored in the table or
> visible for the user respectively.

This is due to how SQL works (and is supposed to work).

Just try "SELECT hasbbox(dropbbox(geom)) FROM geotable". It should
return false for all rows.

SELECT is a read-only operation. Its purpose is to deliver Data to the
client. It basically copies the data from the disk into memory
row-by-row, then evaluates the expressions you had in your statement for
each of these rows, like the dropbbox() call, and after that returns the
result to the client.

Of course, there are special cases like functions with side effects
which can parmanently modify data through a SELECT, but this is against
the SQL philosophy.


More information about the postgis-users mailing list