Skip to content

Commit

Permalink
issue #4193 - Allow - in database usernames (#4209)
Browse files Browse the repository at this point in the history
When there are dashes (-) in the Postgres username, the schematool fails
with an exception. In Postgres, dashes are legal in usernames, so the
verifying pattern is adapted accordingly.

Signed-off-by: Bauer, Johannes <johannes.bauer@uk-erlangen.de>
  • Loading branch information
bauerjs1 committed May 17, 2023
1 parent 5b26a1b commit 8429bf7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Handles common syntax for generating DDL
*/
public class DataDefinitionUtil {
private static final String NAME_PATTERN_RGX = "[a-zA-Z_]\\w*$";
private static final String NAME_PATTERN_RGX = "[a-zA-Z_][-\\w]*$";
private static final Pattern NAME_PATTERN = Pattern.compile(NAME_PATTERN_RGX);

/**
Expand Down

0 comments on commit 8429bf7

Please sign in to comment.