[mapserver-users] Using unique
Pena Kupen
kupen at wippies.fi
Thu Jul 14 22:26:25 PDT 2011
Hello Carlos and all,
I'm using query, which is little cryptic.
location from (
select h.location, h.oid, k.expla, h.date1, h.expla, h.total, ku.locationname as name
from
(select pa.location, ha.type_id as oid, ha.date1, pa_n.name, pa_n.location_id, ha.car_id, ha.total
from pa
join ha on ha.ha_pa_id = pa.pa_id
left join pa_n on pa.pa_id = pa_n.pa_id
where
ha.type_id = 121557 and
status='11' and
ha.is_valid is NULL
) as h
left join ku on h.ku_id=ku.ku_id
left join k on h.type_id = k.type_id
where
k.code='sc' and
syno=false and
(h.ku_id = 'AAC')
) as foobar
This has been used without any problem.
-Pena
Carlos Ruiz [boolean10001 at yahoo.com] kirjoitti:
> Pena,
>
> Can you post your query ?
>
> You can use:
>
> DATA "the_geom FROM <table>"in the traditional way
>
>
> Or, if you're using a query or a view datasource, you can use:
>
> DATA "the_geom FROM <query>|<view> AS <alias> USING UNIQUE <column> USING SRID=<SRC>
>
> Cheers from México
>
>
> IC Carlos Ruiz
>
>
>
> ________________________________
> From: Pena Kupen <kupen at wippies.fi>
> To: mapserver-users at lists.osgeo.org
> Sent: Thursday, July 14, 2011 2:59 AM
> Subject: [mapserver-users] Using unique
>
> Sorry doubleposting! There where little "copy/paste-error". You can ignore prior...
>
> -Pena
>
>
> Hello all,
>
> I'm just upgrading our system from mapserver 5.4.2 to 5.6.6.
> In some of our layer queries, I got now error:
> msPostGISParseData(): Query error. Error parsing PostGIS DATA variable. You must specifiy 'using unique' when supplying a subselect in the data definition.
> When using 5.4.2, this is not happaning and maps are working ok.
>
> On mapserver/postgis manual (http://mapserver.org/input/vector/postgis.html) it says:
> The DATA parameter is used to specify the data used to draw the map. The form of DATA is
[geometry_column] from [table_name|sql_subquery] using unique [unique_key] using srid=[spatial_reference_id]
. The
using unique
and
using srid=
clauses are optional, but using them improves performance.
>
> Is this a bug or why I cannot anymore use queries without "using unique"?
>
> -Pena
>
>
> -- Wippies-vallankumous on täällä! Varmista paikkasi vallankumouksen eturintamassa ja liity Wippiesiin heti!
> http://www.wippies.com/
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Wippies-vallankumous on täällä! Varmista paikkasi vallankumouksen eturintamassa ja liity Wippiesiin heti!
http://www.wippies.com/
More information about the MapServer-users
mailing list