Skip to content

Commit 8429bf7

Browse files
authored
issue #4193 - Allow - in database usernames (#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 <johannes.bauer@uk-erlangen.de>
1 parent 5b26a1b commit 8429bf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fhir-database-utils/src/main/java/org/linuxforhealth/fhir/database/utils/common/DataDefinitionUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Handles common syntax for generating DDL
2222
*/
2323
public class DataDefinitionUtil {
24-
private static final String NAME_PATTERN_RGX = "[a-zA-Z_]\\w*$";
24+
private static final String NAME_PATTERN_RGX = "[a-zA-Z_][-\\w]*$";
2525
private static final Pattern NAME_PATTERN = Pattern.compile(NAME_PATTERN_RGX);
2626

2727
/**

0 commit comments

Comments
 (0)