Skip to content

Commit

Permalink
Updated error message for IDENTITY() escape hatch (babelfish-for-post…
Browse files Browse the repository at this point in the history
…gresql#2063)

Task: BABEL-539
Signed-off-by: Deepakshi Mittal <[email protected]>
  • Loading branch information
deepakshi-mittal authored and Jason Teng committed Dec 24, 2023
1 parent 2a9ddf1 commit 74e38fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contrib/babelfishpg_tsql/src/backend_parser/gram-tsql-rule.y
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ func_expr_common_subexpr:
{
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("IDENTITY() is not currently supported in Babelfish. please use babelfishpg_tsql.escape_hatch_identity_function to ignore"),
errmsg("To use IDENTITY(), set \'babelfishpg_tsql.escape_hatch_identity_function\' to \'ignore\'"),
parser_errposition(@1)));
}
}
Expand All @@ -2033,7 +2033,7 @@ func_expr_common_subexpr:
{
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("IDENTITY() is not currently supported in Babelfish. please use babelfishpg_tsql.escape_hatch_identity_function to ignore"),
errmsg("To use IDENTITY(), set \'babelfishpg_tsql.escape_hatch_identity_function\' to \'ignore\'"),
parser_errposition(@1)));
}

Expand All @@ -2048,7 +2048,7 @@ func_expr_common_subexpr:
{
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("IDENTITY() is not currently supported in Babelfish. please use babelfishpg_tsql.escape_hatch_identity_function to ignore"),
errmsg("To use IDENTITY(), set \'babelfishpg_tsql.escape_hatch_identity_function\' to \'ignore\'"),
parser_errposition(@1)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/JDBC/expected/BABEL_539-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ EXEC babel_539_prepare_proc
GO
~~ERROR (Code: 33557097)~~

~~ERROR (Message: IDENTITY() is not currently supported in Babelfish. please use babelfishpg_tsql.escape_hatch_identity_function to ignore)~~
~~ERROR (Message: To use IDENTITY(), set 'babelfishpg_tsql.escape_hatch_identity_function' to 'ignore')~~


SELECT current_setting('babelfishpg_tsql.escape_hatch_identity_function');
Expand Down

0 comments on commit 74e38fe

Please sign in to comment.