database_default is a SQL Server-specific collation that explicitly tells SQL Server to use the database's default collation, overriding the default collation precedence behavior. This is used in a
COLLATE clause most typically to avoid collation conflict errors that arise when using temp tables in scenarios where
tempdb's default collation differs from the current database's default collation and string columns are being joined or concatenated.
The Java code would need to be edited to remove the
COLLATE DATABASE_DEFAULT from the query. Though if this app is coded for Microsoft SQL Server, will it work in PostgreSQL even if this one part is fixed? There are other SQL syntax and datatype differences between the RDBMSs.
For more information on migrating from SQL Server to PostgreSQL, please see:
However, if you are dealing with a 3rd party app that has embedded T-SQL, then you might be forced to contact the software vendor to ask about the potential for PostgreSQL support.