@ -41,7 +41,7 @@ public class SqlPartitioningRepository {
@Autowired
privateJdbcTemplatejdbcTemplate;
privatestaticfinalStringSELECT_PARTITIONS_STMT="SELECT tablename from pg_tables WHERE schemaname = 'public' and tablename like concat(?, '_%')";
privatestaticfinalStringSELECT_PARTITIONS_STMT="SELECT tablename from pg_tables WHERE schemaname = current_schema() and tablename like concat(?, '_%')";
privatestaticfinalintPSQL_VERSION_14=140000;
privatevolatileIntegercurrentServerVersion;
@ -54,7 +54,8 @@ public class SqlPartitioningRepository {
getJdbcTemplate().execute(partition.getQuery());
}
@Transactional(propagation=Propagation.NOT_SUPPORTED)// executing non-transactionally, so that parent transaction is not aborted on partition save error