[mapguide-users] Help required following up on a FDO PostgreSQL provider bug
Ari Hyvönen
ari.hyvonen at gmail.com
Sun Jul 27 23:30:57 PDT 2025
Hi,
I can confirm that this fixes issue for my case. Thank you very much!
Br, Ari
su 27.7.2025 klo 9.19 Jackie Ng via mapguide-users (
mapguide-users at lists.osgeo.org) kirjoitti:
> Unfortunately, I still could not get this "class not found" to trigger
> with the instructions given.
>
> Nevertheless I looked at the code in question and can see how the way the
> query is currently constructed would be incorrect in certain cases.
>
> So as much as it pains me, I have made a *theoretical* fix and will have
> to ask you to confirm if this issue is resolved by it.
>
> The code patch in question is here:
>
> https://trac.osgeo.org/fdo/attachment/ticket/1003/postgis-matview.patch
>
> A compiled PostGIS provider with these code changes can be downloaded here:
>
>
> https://download.osgeo.org/mapguide/releases/4.0.0/Beta3/Patches/PostgreSQLProvider.zip
>
> Download and overwrite the existing PostgreSQLProvider.dll in your
> existing MG 4.0 Beta 3 install.
>
> Please do let me know if this resolves your issue as soon as possible.
> Thanks.
>
> - Jackie
>
> You wrote:
>
> Hi,
>
> I think that error occurs only when you are viewing data
>
> I think that error occurs only when you are viewing data as layer. Here's
>
> steps for replicating that.
>
> 1. Start
>
> 1. Start with empty database with postgis extension created.
>
> 2. Create normal view with this command:
>
> CREATE VIEW public.v_test
>
> AS
>
> WITH point_series AS (
>
> SELECT generate_series('-20'::integer::numeric, 20::numeric, 0.5)
>
> AS point_values
>
> )
>
> SELECT row_number() OVER () AS id,
>
> st_setsrid(st_point(point_values::double precision,
>
> point_values::double precision), 4326) AS geom
>
> FROM point_series a;
>
> 3. Create database connection in Mapguide and layer from view
>
> 3. Create database connection in Mapguide and layer from view above and and
>
> that to Map.
>
> 4. Browse Map and everything is fine.
>
> 5. Create materialized view to database. It should work with previous
>
> examples too but you can also create materialized view with geometry column
>
> in it.
>
> CREATE MATERIALIZED VIEW public.mv_test2
>
> AS
>
> WITH point_series AS (
>
> SELECT generate_series('-20'::integer::numeric, 20::numeric, 0.5)
>
> AS point_values
>
> )
>
> SELECT row_number() OVER () AS id,
>
> st_setsrid(st_point(point_values::double precision,
>
> point_values::double precision), 4326) AS geom
>
> FROM point_series a;
>
> 6. Refresh database datasource in Mapguide so it will get info about new
>
> materialized view.
>
> 7. Browse Map for awhile. Layer will be lost and visible again and error
>
> log will have rows showing error Class 'public:v_test' not found
>
> 8. Delete materialized view from database, refresh datasource and layer
>
> will work again when Browsing map.
>
> If you
>
> If you run query shown in ticket with correct parameters it will return
>
> only table or normal view with same schema and name as in parameters and
>
> all materialized views. If you add these conditions to where part of second
>
> select after union query will return only wanted rows. Values should be the
>
> same as placed to first select.
>
> AND ns.nspname='public' AND c.relname='v_test'
>
> SELECT t.table_schema || '.' || t.table_name AS name,
>
> lower(t.table_type) AS type, convert_to(t.table_schema,'UTF8') as
>
> collate_schema_name, convert_to(t.table_name,'UTF8') as collate_table_name
>
> FROM information_schema.tables AS t
>
> WHERE t.table_schema not in ( 'information_schema' ,'pg_catalog') and (
>
> (t.table_schema = 'public' and t.table_name = 'v_test') ) AND t.table_type
>
> IN ('BASE TABLE','VIEW') AND t.table_name not in ( 'geometry_columns',
>
> 'geography_columns','spatial_ref_sys', 'raster_columns', 'raster_overviews')
>
> UNION
>
> SELECT ns.nspname || '.' || c.relname AS name, 'view' AS type,
>
> convert_to(ns.nspname,'UTF8') AS collate_schema_name,
>
> convert_to(c.relname,'UTF8') AS collate_table_name
>
> FROM pg_class AS c JOIN pg_namespace ns ON c.relnamespace = ns.oid
>
> WHERE c.relkind = 'm' AND ns.nspname='public' AND c.relname='v_test'
>
> ORDER BY collate_schema_name, collate_table_name ASC;
>
> Br, Ari
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20250728/39e3461f/attachment.htm>
More information about the mapguide-users
mailing list