Skip to content

Commit

Permalink
Merge pull request #1732 from taozhi8833998/feat-accentuated-chars-pg
Browse files Browse the repository at this point in the history
feat: support accentuated characters in column of pg
  • Loading branch information
taozhi8833998 authored Dec 23, 2023
2 parents 0838ab2 + 6e859fe commit 2571991
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pegjs/postgresql.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -4095,7 +4095,7 @@ ident_start = [A-Za-z_\u4e00-\u9fa5]
ident_part = [A-Za-z0-9_\-$\u4e00-\u9fa5\u00C0-\u017F]

// to support column name like `cf1:name` in hbase
column_part = [A-Za-z0-9_\u4e00-\u9fa5]
column_part = [A-Za-z0-9_\u4e00-\u9fa5\u00C0-\u017F]

param
= l:(':' ident_name) {
Expand Down
7 changes: 7 additions & 0 deletions test/postgres.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,13 @@ describe('Postgres', () => {
`SELECT * FROM crosstab('select student, subject, evaluation_result from evaluations order by 1,2', $$VALUES ('t'::text), ('f'::text)$$) AS final_result("Student" TEXT, "Geography" NUMERIC, "History" NUMERIC, "Language" NUMERIC, "Maths" NUMERIC, "Music" NUMERIC)`
]
},
{
title: 'accentuated characters in column',
sql: [
"SELECT * FROM test WHERE théâtre = 'Molière'",
`SELECT * FROM "test" WHERE "théâtre" = 'Molière'`
]
},
]
neatlyNestTestedSQL(SQL_LIST)
})
Expand Down

0 comments on commit 2571991

Please sign in to comment.