New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align parsing between alias and path parts of databases.conf [CORE6473] #6704
Comments
Commented by: @mrotteveel What is the rationale for this? |
Commented by: @dyemanov It was always possible to use a full pathname for an alias, thus transparently substituting one database location with another (e.g. when aliases are not used but the database should be relocated without touching clients). But it doesn't work if the path contains embedded spaces. |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: Stefan Heymann (stefanheymann) I think the alias should be an identifier that follows the rules you would otherwise apply to variable names (e.g. first character a letter, then only letters, digits and underscores, maybe dashes). |
Commented by: @dyemanov This will break the feature described above. It may not be widely known and perhaps it even looks "hackery", but I know it's used by some DBAs. |
Commented by: @mrotteveel @dmitry I wonder if that should be considered a feature, or just a hack 'abusing' how aliases work. |
Commented by: @AlexPeshkoff Mark, I do not know was such usage ever documented or not (on the other hand - why document it after the fact that alias is any string?) but that works de-facto since 1.5, therefore I think we should treat changing visible database path using aliases as feature. |
Commented by: @mrotteveel I think the consequence and requirements of this must be fully thought through. For example, it is possible to have a database path like `D:\DB\a=b\database.fdb` / `/var/firebird/a=b/database.fdb`. Defining an alias for that would be hard given the equals (=). So supporting the full syntax requires additional measures (e.g. enclosing such 'keys' in quotes). |
Submitted by: Basil A. Sidorov (basid)
Currently quoted string may used only in right (path) part of alias definition in databases.conf.
If
some_path = another_path # valid
and
some_path = "another path" # valid also
then
"some path" = "anoter_path" # is error but must be valid
Left (alias itself) and right (path) parts of alias definition must be parsed by single ruleset with all OS-depended (case sensitive) and Firebird macros features.
The text was updated successfully, but these errors were encountered: