[TinyOWS-users] fids in database views
Jukka.Rahkonen at mmmtike.fi
Thu Sep 23 09:13:57 EST 2010
Olivier Courtin wrote:
> On Sep 23, 2010, at 3:00 PM, Marco Hugentobler wrote:
> Hi Marco,
> > I'm trying to use WFS-T with an editable postgres view.
> Humm first point is that if you use view, you will not be able
> to edit the feature, as the view is read only.
But Marco was talking about updatable views, such a thing exists in
> > Unfortunately, it seems TinyOWS does not give fid
> attributes to the
> > features (even though one of
> > the view columns is a primary key in the source table).
> > Is there a way to
> > configure TinyOWS to generate an fid for views (e.g. by
> specifying a
> > view column
> > as pkey)?
> You're right this something have to be enhance.
> I created the related ticket: http://tinyows.org/trac/ticket/57
> Nota: it will behave same for views and tables.
If you want to read how a similar feature was added to Geoserver, read
through the thread below. In short, in Geoserver configuration there is
a place to show the name of a metadata table that is stored into PostGIS
or Oracle database. If that configuration option is set Geoserver reads
the contents of the table. Geoserver is using that information for
constructing fids. Fids can be constructed from one or several columns.
This is good for PostGIS users because there is no other good way to
find something that could be used for unique fids (in Oracle it is
possible to create primary key also for views). Naturally it is much
easier to handle WFS-T if fid comes from one column, but Geoserver
configuration allows also situation where user knows the unique values
which are to be used as primary key (policy-assigned).
Another use for the Geoserver metadata table is to show the name of a
sequence that should be fired when doing inserts. This is useful for
Oracle users because Oracle does not have "serial" data type but the
serial number must be taken from some sequence.
More information about the TinyOWS-users