[MapServer-users] Postgres DATA query with LIMIT 10 does not work

Marcin Niemyjski mniemyjski at cloudferro.com
Thu Oct 19 02:39:18 PDT 2023


Hello,


I encountered a problem, specifically:

This query works:

DATA 'geometry from (select * from mrc order by maxcc desc) as subquery using unique unique_id'


However, this query doesn't work:

DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as subquery using unique unique_id'


Here's the full tileindex definition:

LAYER
 DEBUG 5
 STATUS OFF
 NAME "time_idx"
 TYPE POLYGON

 CONNECTIONTYPE postgis
 CONNECTION "***"

 DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as subquery using unique unique_id'

 PROJECTION
   "init=epsg:3857"
 END

 VALIDATION
    'maxCC' '^[0-9]{1,3}$'
    'default_maxCC' '100'
 END

 METADATA
   "wms_title" "tile-index-cloud"
   "wms_timeextent" "2022-02-01/2023-10-10/P1D"
   "wms_timeitem" "timestamp"
   "wms_timedefault" "2023-10-10"
   "wms_enable_request" "!*"
 END
END


My MapServer version is 7.6.4.

The query results (but returns data in Postgres
) in an empty window. I'm following the guidelines provided at https://mapserver.org/input/vector/postgis.html#data-access-connection-method.

Best,
marcin
[https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png]<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>           Book time to meet with me<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231019/ee451a00/attachment.htm>


More information about the MapServer-users mailing list