Help Center/
GaussDB/
Developer Guide(Centralized_8.x)/
Application Development Guide/
ECPG-based Development/
Preprocessor Directives/
Including Files
Updated on 2024-06-03 GMT+08:00
Including Files
To include an external file in an embedded SQL program, use the following statements:
EXEC SQL INCLUDE filename; EXEC SQL INCLUDE <filename>; EXEC SQL INCLUDE "filename";
- ECPG searches for files in the following sequence:
- Current directory
- /usr/local/include
- GaussDB Kernel directory, which is defined at build time
- /usr/include
- When EXEC SQL INCLUDE "filename" is used, only the current directory is searched.
- In each directory, ECPG will first look for the file name as given, and if not found will append .h to the file name and try again (unless the specified file name already has that suffix).
- The file name is case sensitive.
Parent topic: Preprocessor Directives
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot