diff --git a/src/languages/transactsql/transactsql.functions.ts b/src/languages/transactsql/transactsql.functions.ts index 326a2cb995..41078a7293 100644 --- a/src/languages/transactsql/transactsql.functions.ts +++ b/src/languages/transactsql/transactsql.functions.ts @@ -233,7 +233,6 @@ export const functions: string[] = [ // string 'ASCII', - 'CHAR', 'CHARINDEX', 'CONCAT', 'CONCAT_WS', @@ -243,7 +242,6 @@ export const functions: string[] = [ 'LEN', 'LOWER', 'LTRIM', - 'NCHAR', 'PATINDEX', 'QUOTENAME', 'REPLACE', diff --git a/test/transactsql.test.ts b/test/transactsql.test.ts index 655a88f106..0fe818a84f 100644 --- a/test/transactsql.test.ts +++ b/test/transactsql.test.ts @@ -190,4 +190,11 @@ describe('TransactSqlFormatter', () => { GOTO InfiniLoop; `); }); + + // Issue #811 + it('does not detect CHAR() as function', () => { + expect(format(`CREATE TABLE foo (name char(65));`, { functionCase: 'upper' })).toBe(dedent` + CREATE TABLE foo (name char(65)); + `); + }); });