0

Below statmen generated from h2

 INSERT INTO EPSG_ALIAS
   (ALIAS_CODE, OBJECT_TABLE_NAME, OBJECT_CODE, NAMING_SYSTEM_CODE, ALIAS, REMARKS) 
 VALUES 
   (1431, 'Datum', 6123, 7300, STRINGDECODE('Kartastokoordinaattij\ufffdrjestelm\ufffd (1966)'), NULL);

When i execute the above statment in postgresql i am getting following error.

ERROR: function stringdecode(unknown) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Character: 140
Madhava
  • 77
  • 2
  • 9

1 Answers1

2

STRINGDECODE is the way of H2 to read 'ASCII written UTF-8 characters'.

For Postgres, it's a simple 'E' before your string:

STRINGDECODE('Kartastokoordinaattij\ufffdrjestelm\ufffd (1966)')

Becomes

E'Kartastokoordinaattij\ufffdrjestelm\ufffd (1966)'