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
Make ISQL "input" command open relative filenames based on the directory of last opened (and not closed) input file [CORE2575] #2985
Comments
Modified by: @asfernandesFix Version: 3.0 Alpha 1 [ 10331 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: Sean Leyne (seanleyne) Adriano, The current functionality is correct, if you want isql to look in the /dir folder, then you *should* be launching isql from that folder. Local references are always from the launching folder. I do not believe this change is appropriate (at the very least, not without a new switch). |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pcisardescription: If you do in ISQL: And /dir/script.sql have: start.sql is looked relative to user current directory. This makes difficult to create correct modular scripts. To run the main script, you should go to its directory first. Relative paths shall be based on the directory of the last file included (and not closed) with input. => If you do in ISQL: And /dir/script.sql have: start.sql is looked relative to user current directory. This makes difficult to create correct modular scripts. To run the main script, you should go to its directory first. Relative paths shall be based on the directory of the last file included (and not closed) with input. |
Commented by: @dyemanov I've just been hit by this issue. The problem is that this change is not backward compatible and it's likely to affect some amount of the exising scripts. I agree with the benefits it provides but it also makes it impossible to write scripts independent of the FB (read: ISQL) version. Not sure what is more important. As a side note, I think the current error reporting is incorrect. We should print not the pathname entered by the user but the resolved pathname. Otherwise, it leaves the user scratching his head without any clue why it cannot open the existing file at the supposedly correct location. |
Commented by: @asfernandes The only kind-of backward reasonable way to make this that I see is to then use the new behaviour only with paths starting with dot (back-)slash. |
Modified by: @pavel-zotovQA Status: No test |
Submitted by: @asfernandes
If you do in ISQL:
input /dir/script.sql;
And /dir/script.sql have:
input 'start.sql';
start.sql is looked relative to user current directory.
This makes difficult to create correct modular scripts. To run the main script, you should go to its directory first.
Relative paths shall be based on the directory of the last file included (and not closed) with input.
Commits: 42e378d 71d8df8
The text was updated successfully, but these errors were encountered: