Mango M2M 2.2.2 Postgresql Issue
-
Hi Folks,
New mango M2M is providiing feature to migrate data to postgresql, but it is not working. I tried to change Mango DB, Durby to Postgresql, but it created many problems for me:
First issue When Starting Mango after changing configuration:
Related to DATA column which is of BYTEA datatype.
Second, Mango is diplaying this error while adding datasource,
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT dp.id,dp.data,dp.xid,dp.dataSourceId,dp.name,dp.deviceName,dp.enabled,dp.pointFolderId,dp.loggingType,dp.intervalLoggingPeriodType,dp.intervalLoggingPeriod,dp.intervalLoggingType,dp.tolerance,dp.purgeOverride,dp.purgeType,dp.purgePeriod,dp.defaultCacheSize,dp.discardExtremeValues,dp.engineeringUnits,ds.name,ds.xid,ds.dataSourceType FROM dataPoints AS dp join dataSources ds on ds.id = dp.dataSourceId WHERE dp.dataSourceId IN (?) ORDER BY dp.deviceName, dp.name LIMIT ? OFFSET ?]; nested exception is org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.:evil:
Any Help would be appreciated...
-
Postgresql is not supported by Mango. I'm not sure where you saw that it was?
Joel. -
From the GitHub public source:
https://github.com/infiniteautomation/ma-core-public/blob/master/Core/db/createTables-POSTGRES.sql
Also, test-env.properties is configured for postgres:
https://github.com/infiniteautomation/ma-core-public/blob/master/Core/src-test/test-env.properties
-
We did do experimenting with Postgresql in the past but it was never officially supported or released.
Joel.
-
Sad to hear that.
I was also planning to migrate from Derby to PostgreSQL. I prefer postgres over MySQL due to license terms.