On Mon, Feb 14, 2011 at 10:57 AM, Mario Basa <mario.b...@gmail.com> wrote:
> Hello,
>
> I have a lot of PostgreSQL attribute tables which I would like to link
> to a single geographic table on demand to create thematic maps.
>
> My parametric sql statement is:
>
> select a.*,the_geom from %link_table% a, maptable b where a.code = b.code
>
> I then created a "dummy" table that contains just a "code" field and
> used the "dummy" as the default value of the %link_table% so that I
> can register the layer.
>
> My problem is when I make a wms/wfs request with a
> "viewparams=link_table:attribtab1", I can only get the "code" field
> and none of the other attribute fields of the table.
>
> Since all of my attribute tables have different schemas, is there any
> of forcing geoserver to read the returned schema from the sql request,
> and not just the registered field name.

Can't do this, the feature type has to be stable.
With sql views you can do whatever you want, but the set of returned attributes
must be fixed.

In GeoServer there is no concept of layer whose attribute change over time,
it would also break badly most WFS clients

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to