Re: [mapserver-users] Using unique

2011-07-17 Thread Pena Kupen

Thank's Steve,

I have updated to 5.6.7, which working same way!

-Pena

Steve Lime [sdl...@gmail.com] kirjoitti: 

I've always used unique with PostGIS so it's not a surprise. The one-pass query 
stuff added in 5.6 probably the culprit. You might file a ticket just in case 
and the PostGIS devs can comment. I'm curious if 6.0 also behaves this way? 
(make sure to upgrade to 5.6.7!) -Steve

Sent from my iPad

On Jul 15, 2011, at 2:05 AM, Pena Kupen ku...@wippies.fi wrote:

 Hi again,
 
 I'm answering to my by myself :-)
 
 When I add to the end of my query using unique as:

  as foobar using unique oid 
 then query is again running ok. I also tried it with older version of 
Mapserver (5.4.2). Both versions are working ok with it.
 
 After some debugging of version 5.6.6, it seems to me , that in query, there is missing last right parenthesis if using unique is omitted. Some bug?
 
 -Pena
 
 Pena Kupen [ku...@wippies.fi] kirjoitti: 
 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.totalfrom pa 
   join ha on ha.ha_pa_id = pa.pa_idleft join pa_n on pa.pa_id = 
pa_n.pa_idwhereha.type_id = 121557 and
status='11' andha.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 [boolean10...@yahoo.com] kirjoitti:  Pena,
   Can you post your query ?
   You can use:
   DATA the_geom FROM tablein 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 ku...@wippies.fi
  To: mapserver-users@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@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/
 ___
 mapserver-users mailing list
 mapserver-users@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/
 
 ___

 mapserver-users mailing list
 mapserver-users@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/

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Using unique

2011-07-15 Thread Pena Kupen

Hi again,

I'm answering to my by myself :-)

When I add to the end of my query using unique as:
 as foobar using unique oid 
then query is again running ok. 
I also tried it with older version of Mapserver (5.4.2). Both versions are working ok with it.


After some debugging of version 5.6.6, it seems to me , that in query, there is missing 
last right parenthesis if using unique is omitted. Some bug?

-Pena

Pena Kupen [ku...@wippies.fi] kirjoitti: 

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 [boolean10...@yahoo.com] kirjoitti: 
 Pena,
 
 Can you post your query ?
 
 You can use:
 
 DATA the_geom FROM tablein 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 ku...@wippies.fi
 To: mapserver-users@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@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/

___
mapserver-users mailing list
mapserver-users@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/

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Using unique

2011-07-14 Thread Pena Kupen

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Using unique

2011-07-14 Thread Pena Kupen

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(http://mapserver.org/input/vector/postgis.html): 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 ()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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Using unique

2011-07-14 Thread Carlos Ruiz
Pena,

Can you post your query ?

You can use:

DATA the_geom FROM tablein 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 ku...@wippies.fi
To: mapserver-users@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Using unique

2011-07-14 Thread Pena Kupen

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 [boolean10...@yahoo.com] kirjoitti: 

Pena,

Can you post your query ?

You can use:

DATA the_geom FROM tablein 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 ku...@wippies.fi
To: mapserver-users@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@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/

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] USING UNIQUE with multiple fields

2011-03-29 Thread geographika

 Hi

/[Message resent as it got added to a previous discussion - thanks 
ThunderBird..]/


I have a feature table which I'm serving out as a WFS. It has a two 
column unique index - is there support for this in a LAYER definition in 
a mapfile?


E.g. DATA GEOM from mytable USING SRID=29902 USING UNIQUE Field1,Field2

I presume not as I've tried a few combinations with no success, but just 
wondered if this is possible. I'm using a SQL Server 2008 connection.

Thanks for any help,

Seth

--
web:http://geographika.co.uk
twitter: @geographika



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] USING UNIQUE with multiple fields

2011-03-29 Thread Rahkonen Jukka
Hi,
 
If you won't get any better advice, try a workaround by combining the
primary key columns into single one be creating a view.
 
-Jukka Rahkonen-




geographika  wrote:

 Hi

[Message resent as it got added to a previous discussion -
thanks ThunderBird..]

I have a feature table which I'm serving out as a WFS. It has a
two column unique index - is there support for this in a LAYER
definition in a mapfile?

E.g. DATA GEOM from mytable USING SRID=29902 USING UNIQUE
Field1,Field2

I presume not as I've tried a few combinations with no success,
but just wondered if this is possible. I'm using a SQL Server 2008
connection. 
Thanks for any help,

Seth


--
web: http://geographika.co.uk http://geographika.co.uk 
twitter: @geographika





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] USING UNIQUE with multiple fields

2011-03-29 Thread Tamas Szekeres
Hi,

That is not possible, the feature ID must be an integer field with the
current implementation.

Best regards,

Tamas



2011/3/29 geographika geograph...@gmail.com

  Hi

 I have a feature table which I'm serving out as a WFS. It has a two column
 unique index - is there support for this in a LAYER definition in a mapfile?

 E.g. DATA GEOM from mytable USING SRID=29902 USING UNIQUE Field1,Field2

 I presume not as I've tried a few combinations with no success, but just
 wondered if this is possible. I'm using a SQL Server 2008 connection.
 Thanks for any help,

 Seth

  --
 web: http://geographika.co.uk
 twitter: @geographika



 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] USING UNIQUE with multiple fields

2011-03-29 Thread geographika
Thanks Tamas and Jukka for you replies. I'll be able to work around it 
with a view as suggested.

It would be good to clarify the USING UNIQUE clause somewhere in the docs.

--
web:http://geographika.co.uk
twitter: @geographika

On 29/03/2011 12:39, Tamas Szekeres wrote:

Hi,

That is not possible, the feature ID must be an integer field with the 
current implementation.


Best regards,

Tamas



2011/3/29 geographika geograph...@gmail.com 
mailto:geograph...@gmail.com


Hi

I have a feature table which I'm serving out as a WFS. It has a
two column unique index - is there support for this in a LAYER
definition in a mapfile?

E.g. DATA GEOM from mytable USING SRID=29902 USING UNIQUE
Field1,Field2

I presume not as I've tried a few combinations with no success,
but just wondered if this is possible. I'm using a SQL Server 2008
connection.
Thanks for any help,

Seth

--
web:http://geographika.co.uk
twitter: @geographika



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
mailto:mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] USING UNIQUE with multiple fields

2011-03-28 Thread geographika

Hi

I have a feature table which I'm serving out as a WFS. It has a two 
column unique index - is there support for this in a LAYER definition in 
a mapfile?


E.g. DATA GEOM from mytable USING SRID=29902 USING UNIQUE Field1,Field2

I presume not as I've tried a few combinations with no success, but just 
wondered if this is possible. I'm using a SQL Server 2008 connection.

Thanks for any help,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users