Parse SET NAMES syntax in Postgres (#1752)

This commit is contained in:
Michael Victor Zink 2025-02-28 22:12:25 -08:00 committed by GitHub
parent a629ddf89b
commit 9e09b617e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 39 additions and 12 deletions

View file

@ -14631,3 +14631,11 @@ fn parse_array_type_def_with_brackets() {
dialects.verified_stmt("SELECT x::INT[]");
dialects.verified_stmt("SELECT STRING_TO_ARRAY('1,2,3', ',')::INT[3]");
}
#[test]
fn parse_set_names() {
let dialects = all_dialects_where(|d| d.supports_set_names());
dialects.verified_stmt("SET NAMES 'UTF8'");
dialects.verified_stmt("SET NAMES 'utf8'");
dialects.verified_stmt("SET NAMES UTF8 COLLATE bogus");
}