Skip to content

Commit

Permalink
issue LinuxForHealth#4193 - Allow - in database usernames (LinuxFor…
Browse files Browse the repository at this point in the history
…Health#4209)

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 <[email protected]>
  • Loading branch information
bauerjs1 authored 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.