Add expected errors for postgres 18#1298
Conversation
| public static List<String> getCommonExpressionErrors() { | ||
| ArrayList<String> errors = new ArrayList<>(); | ||
|
|
||
| errors.add("for encoding \"SQL_ASCII\" does not exist"); |
There was a problem hiding this comment.
Hmm, why does this happen? Is this something that we should avoid generating instead?
There was a problem hiding this comment.
I err towards adding this as expected error.
The root cause is if the database was created without specifying UTF8 encoding, then specifying COLLATE later will be invalid. e.g.
CREATE DATABASE database7 TEMPLATE template0;
CREATE UNLOGGED TABLE t3(c0 TEXT COLLATE "pg_c_utf8" UNIQUE) INHERITS(t2, t1);
The other fix option would be enforcing UTF8 encoding in PostgresProvider instead of making it randomized, but I feel like it will lead to less diverse behaviors.
|
Added 1 further expected errors:
Disabled Fixed NullPonterException for |
mrigger
left a comment
There was a problem hiding this comment.
Regarding the PostgresBinaryComparisonOperation, I have a minor comment/request. Could you please take a look at this?
It seems that that the linter check is currently failing. You'll need to execute the code formatter: mvn formatter:format.
After that, we can merge the change.
Thanks!
| PostgresConstant rightExpectedValue = getRight().getExpectedValue(); | ||
| if (leftExpectedValue == null || rightExpectedValue == null) { | ||
| return null; | ||
| return PostgresConstant.createNullConstant(); |
There was a problem hiding this comment.
Hmm, I think this should probably throw an IgnoreMeException. This logic is part of PQS. I think null is only returned if some functionality is not fully implemented.
| this.statistics = statistics; | ||
| this.isInsertable = isInsertable; | ||
| this.tableType = tableType; | ||
| //TODO: simple adapter for other implementations |
There was a problem hiding this comment.
Hmm, I don't understand what that comment means, but I guess it's fine.
There was a problem hiding this comment.
The PostgresTable class can be instantiated at the fromConnection function below, as a result of a schema query, in the generator by the PostgresTableGenerator, as well as by other DBMS implementations that depends on the Postgres one.
The new constructor signature with an additional isPartitioned argument is not easily applicable to all of those. Hence I left this original constructor in place with the isPartitioned flag set to false by default as an adapter.
Add expected errors related to SQL_ASCII encoding in PG18; Add error message related to WAL enforcement on partitioned table