Skip to content

Add expected errors for postgres 18#1298

Open
albertZhangTJ wants to merge 2 commits intosqlancer:mainfrom
albertZhangTJ:main
Open

Add expected errors for postgres 18#1298
albertZhangTJ wants to merge 2 commits intosqlancer:mainfrom
albertZhangTJ:main

Conversation

@albertZhangTJ
Copy link
Collaborator

Add expected errors related to SQL_ASCII encoding in PG18; Add error message related to WAL enforcement on partitioned table

@albertZhangTJ albertZhangTJ requested a review from mrigger March 3, 2026 01:41
public static List<String> getCommonExpressionErrors() {
ArrayList<String> errors = new ArrayList<>();

errors.add("for encoding \"SQL_ASCII\" does not exist");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, why does this happen? Is this something that we should avoid generating instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants