Hi,
I am having issues with a materialized view publication on Geoserver. This is how my materialized view looks like:
CREATE MATERIALIZED VIEW master.inspire_admin_boundaries_cont AS
SELECT
row_number() over () as id,
'http://id.igeo.pt/so/AU/AdministrativeBoundaries/' || t.identificador || '/' || to_char(t.inicio_objecto, 'YYYYMMDD') AS "inspireId",
'PT' AS country,
nla.nome_en AS "nationalLevel",
t.inicio_objecto::timestamp AS "beginLifespanVersion",
NULL::timestamp AS "endLifespanVersion", -- A definir
'agreed' AS "legalStatus",
'notEdgeMatched' AS "technicalStatus",
ARRAY[CASE WHEN char_length(t.ea_esquerda) > 5 THEN 'PT1' || t.ea_esquerda END,
CASE WHEN char_length(t.ea_direita) > 5 THEN 'PT1' || t.ea_direita END] AS "admUnit",
t.geometria::geometry(linestring, 3763) AS geometry
FROM base.cont_troco AS t
JOIN dominios.nivel_limite_administrativo AS nla ON t.nivel_limite_admin = nla.identificador;
CREATE UNIQUE INDEX ON master.inspire_admin_boundaries_cont(id);
CREATE INDEX ON master.inspire_admin_boundaries_cont USING gist(geometry);
On the geoserver side, the people that is configuring it say it works fine in WMS and in WFS 1.1, but not WFS 2.0.
First suspect was the lack of an ID column, that’s why row_number() over () was added and the a unique index created, but made no difference. I am not geoserver user, so I am wondering if there’s something else I need to do on postgis side, or if there’s something missing on geoserver.
I could convert everything to tables, but…
UPDATE: Actually it works on WFS 2.0 but complains with the following:
" java.io.IOExceptionCannot do natural order without a primary key, please add it or specify a manual sort over existing attributes"
Thanks,
Alexandre Neto