Subscribe to this thread
Home - General / All posts - M8 Error exporting WKB to Postgres 10
dwatling

136 post(s)
#18-May-18 08:21

I am running Manifold 8.0.30 and do weekly data exports to a Postgres 10 + PostGIS database. To Export the geometry column my query for the result that get exported uses

SELECT

...,

CGeomWKB(Geom([ID])) AS [wkb]

FROM ...

This has been working with no issues for over a year and suddenly this week almost as soon as Manifold starts exporting I get the following error:

ERROR: current transaction block is aborted, commands ignored until end of transaction block

I tried running "Normalize topology" before exporting but get the same error. If I exclude the [wkb] column the other data exports with no problem.

adamw


10,447 post(s)
#18-May-18 08:27

Try exporting fake geoms to see if the issue is related to specific geometry. Eg, try exporting with CGeomWKB(NewPoint(1,2)). If this works, try exporting with CGeomWKB(Centroid(<your geom>)). If that works as well, start filtering records to locate the record that fails.

dwatling

136 post(s)
#18-May-18 08:40

Hi Adam

It does seem to be specific records that are causing the problem. How would one go about "fixing" them?

Derek

adamw


10,447 post(s)
#18-May-18 08:48

What do they contain? What are the geoms? If they are areas, then that might be related to normalization rules, there is potential for bugs there. I'd test by exporting the same geometry in 9. Alternatively, maybe the failing values are too large (too many coordinates) or too small (normalize to a NULL). Or, say, they are of a type that is disallowed by a trigger on PostgreSQL (eg, the trigger only allows points and these records are lines).

dwatling

136 post(s)
#18-May-18 08:59

The geoms are all areas (land parcel boundaries). The error occurs when Manifold exports and is creating a new table so there are no PostgreSQL triggers in play at this stage. The column type created in PostgreSQL is the very generic public.geometry.

If I export

CStr(CGeomWKB(Geom([ID]))) AS [wkt]

it works. From this I can see none of the values are NULL.

I will only be able to test exporting from Manifold 9 on Monday.

adamw


10,447 post(s)
#18-May-18 09:02

OK. Try temporarily converting to lines just to see if that will succeed. If it will, it's pretty likely related to normalization: try normalizing with a bit higher values of the location precision parameter + report a potential bug to tech support (how to report bugs, they will need data eventually).

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.