NumberFormatException with default values of type 'real' in postgresql

Description

To reproduce:

1. Create a table in DB A with not null column of type real with default value 0.
2. Make Changelog from empty DB B to DB A .
3. Now the changelog contains default value "0".
4. Apply changes with "update" command to DB B.
5. Make Changelog between the same dbs B and B.
6. See NumberFormatException.
7. Open column properties on updated DB B in pgAdmin and check that the default value is now "0:real", not just "0".

Expected result:

1. diffChangeLog should correcty parse "0:real" as a default value.
2. update should not insert ":real" and other type specifiers for default value when not required.

Caused by: java.lang.NumberFormatException
at java.math.BigDecimal.<init>(Unknown Source)
at java.math.BigDecimal.<init>(Unknown Source)
at java.math.BigDecimal.<init>(Unknown Source)
at liquibase.util.SqlUtil.parseValue(SqlUtil.java:208)
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readDefaultValue(ColumnSnapshotGenerator.java:387)
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readColumn(ColumnSnapshotGenerator.java:223)
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(ColumnSnapshotGenerator.java:115)
... 20 more

Environment

Windows, postgresql 9.4

Status

Assignee

Unassigned

Reporter

wvladc

Labels

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure