-
Notifications
You must be signed in to change notification settings - Fork 26
Allow the file extension with EXEC SQL INCLUDE
#147
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
Allow the file extension with EXEC SQL INCLUDE
#147
Conversation
allow adding extension in EXEC SQL INCLUDE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the file name matching logic for the EXEC SQL INCLUDE statement to allow a file extension, changing the regular expression from INCFILE to a revised FILENAME pattern and updating the associated token handling. It also adds test coverage for this behavior and ensures that the include tests are executed via Makefile updates.
- Updated regex in ocesql/scanner.l to allow file extensions in file names.
- Replaced token usage from INCFILE to FILENAME to support the extended syntax.
- Added the missing include test to tests/Makefile.
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Makefile | Added basic.src/include.at to the test dependencies list. |
| ocesql/scanner.l | Updated regex and token handling to allow file extensions. |
Summary
The file name specified in
EXEC SQL INCLUDEcontains a file extension, which causes a syntax error, so the file can be precompiled and compiled in this format.Changes
scanner.l
↓
Tests
Add test cases to
basic/include.at.I have confirmed that it can be included even if the file extension is attached.
Miscellaneous
There were a few tests written in
include.atthat were not executed. So I have made the following changes:include.attotests/Makefile.tests/basicafter executingmakeintestsdirectory.