unquote table/column names when inferring sequence name on postgres

This commit is contained in:
Gavin 2022-12-02 21:47:07 +01:00
parent 12682c0abd
commit f91905c34a

View File

@ -10,6 +10,8 @@
import java.sql.Types;
import static org.hibernate.internal.util.StringHelper.unquote;
/**
* @author Andrea Boriero
*/
@ -21,7 +23,7 @@ public boolean supportsIdentityColumns() {
@Override
public String getIdentitySelectString(String table, String column, int type) {
return "select currval('" + table + '_' + column + "_seq')";
return "select currval('" + unquote(table) + '_' + unquote(column) + "_seq')";
}
@Override