[postgis-devel] PG7.4 ordering operator
strk
strk at keybit.net
Wed Nov 19 05:21:04 PST 2003
Found the problem:
> When there is no default [B-tree] operator class for a data type,
> you will get errors like "could not identify an ordering operator"
> if you try to use these SQL features [DISTINCT, GROUP BY, ORDER BY]
> with the data type.
> [...]
> Note: In PostgreSQL versions before 7.4, sorting and grouping operations
> would implicitly use operators named =, <, and >. The new behavior of
> relying on default operator classes avoids having to make any assumption
> about the behavior of operators with particular names.
So we need to define a default b-tree operatoc class in
postgis_sql_74_end.sql.in
--strk;
strk wrote:
> Testing postgis support in PG7.4 (2003-11-11)
> I've encountered to this problem:
>
> ERROR: could not identify an ordering operator for type geometry
> HINT: Use an explicit ordering operator or modify the query.
>
> Whenever I issue one of these commands:
>
> gis=# select the_geom from table1 UNION select the_geom from table2;
> gis=# select DISTINCT the_geom from table1;
> gis=# select the_geom from table1 ORDER BY the_geom;
>
> Operators '<', '>', '=' are available:
>
> oprname | leftoperand | rightoperand
> ---------+-------------+--------------
> << | geometry | geometry
> &< | geometry | geometry
> && | geometry | geometry
> &> | geometry | geometry
> >> | geometry | geometry
> ~= | geometry | geometry
> @ | geometry | geometry
> ~ | geometry | geometry
> = | geometry | geometry
> < | geometry | geometry
> > | geometry | geometry
> (11 rows)
>
> Previous PG versions does not show this problem.
> Any hint on what might be missing ?
>
> --strk;
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list