[TinyOWS-users] fids in database views

Olivier Courtin olivier.courtin at gmail.com
Thu Sep 23 09:47:47 EST 2010


On Sep 23, 2010, at 4:13 PM, Rahkonen Jukka wrote:

Jukka,

>>> 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
> postgres.

AFAIK you could use Rules to perform operations such as Insert on the
tables(s) beneath your view, but the view is not 'natively' updatable.

> 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.

Ok thanks for theses input,

What about following specs for TinyOWS:
- Using PK by default if  present (and able to deal with multi columns  
PK)
- Using incremental fid if no PK founded (maybe using uuid ?)
- User could overhead the fid by something else than PK (column must  
be UNIQUE) in config.xml

--
Olivier


More information about the TinyOWS-users mailing list