<div dir="ltr">I have all my rasters in one table, I would like to serve them through WMS.<br><br>I Generate the mapfile with mapscript and query the rasters with:<pre class="gmail-lang-sql gmail-s-code-block" style="margin-top:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;font-kerning:inherit;font-feature-settings:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;color:rgb(12,13,14)"><code class="gmail-hljs gmail-language-sql" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-kerning:inherit;font-feature-settings:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit">ms_layer.data <span class="gmail-hljs-operator" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-kerning:inherit;font-feature-settings:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">=</span> f"PG:host='{HOST}' user='{USER}' password='{PASS}' " \
                f"dbname='{DB}' schema='{some_schema}' table='{some_table}' " \
                f"column='rast' mode=2 where='field_id IN ({field_ids}) AND rast IS NOT NULL"</code></pre>This works well for a short list of field_ids (up to 6 places integer) but with a long list (could be up to 10000 elements) it won't because of the "path too long error". I assume the DATA instruction is treated as a path and os determines its max length, preventing the query from executing and the "mosaicked" raster to draw. Correct me if I'm wrong.<br><br>How would I approach this?<div><br></div><div>Aleš</div></div>