⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ecpg.1

📁 PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开发团队说,该版本将加速更多企业向该数据库移植.核心开发成员之一Bruce Momjian表示,在新版PostgreSQL
💻 1
字号:
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "ECPG" "1" "2008-01-03" "Application" "PostgreSQL Client Applications".SH NAMEecpg \- embedded SQL C preprocessor.SH SYNOPSIS.sp\fBecpg\fR [ \fB\fIoption\fB\fR\fI...\fR ]  \fB\fIfile\fB\fR\fI...\fR.SH "DESCRIPTION".PP\fBecpg\fR is the embedded SQL preprocessor for Cprograms. It converts C programs with embedded SQL statements tonormal C code by replacing the SQL invocations with specialfunction calls. The output files can then be processed with any Ccompiler tool chain..PP\fBecpg\fR will convert each input file given on thecommand line to the corresponding C output file. Input filespreferably have the extension \fI.pgc\fR, in whichcase the extension will be replaced by \fI.c\fR todetermine the output file name. If the extension of the input fileis not \fI.pgc\fR, then the output file name iscomputed by appending .c to the full file name.The output file name can also be overridden using the\fB-o\fR option..PPThis reference page does not describe the embedded SQL language.See in the documentation for more information on that topic..SH "OPTIONS".PP\fBecpg\fR accepts the following command-linearguments:.TP\fB-c\fRAutomatically generate certain C code from SQL code. Currently, thisworks for EXEC SQL TYPE..TP\fB-C \fImode\fB\fRSet a compatibility mode. \fImode\fR maybe INFORMIX orINFORMIX_SE..TP\fB-D \fIsymbol\fB\fRDefine a C preprocessor symbol..TP\fB-i\fRParse system include files as well..TP\fB-I \fIdirectory\fB\fRSpecify an additional include path, used to find files includedvia EXEC SQL INCLUDE. Defaults are\fI\&.\fR (current directory),\fI/usr/local/include\fR, thePostgreSQL include directory whichis defined at compile time (default:\fI/usr/local/pgsql/include\fR), and\fI/usr/include\fR, in that order..TP\fB-o \fIfilename\fB\fRSpecifies that \fBecpg\fR should write allits output to the given \fIfilename\fR..TP\fB-r \fIoption\fB\fRSelects a run-time behavior. Currently,\fIoption\fR can only beno_indicator..TP\fB-t\fRTurn on autocommit of transactions. In this mode, each SQL command isautomatically committed unless it is inside an explicittransaction block. In the default mode, commands are committedonly when \fBEXEC SQL COMMIT\fR is issued..TP\fB-v\fRPrint additional information including the version and theinclude path..TP\fB--help\fRShow a brief summary of the command usage, then exit..TP\fB--version\fROutput version information, then exit..PP.SH "NOTES".PPWhen compiling the preprocessed C code files, the compiler needs tobe able to find the \fBECPG\fR header files in thePostgreSQL include directory. Therefore, one mighthave to use the \fB-I\fR option when invoking the compiler(e.g., -I/usr/local/pgsql/include)..PPPrograms using C code with embedded SQL have to be linked againstthe \fIlibecpg\fR library, for example using thelinker options -L/usr/local/pgsql/lib -lecpg..PPThe value of either of these directories that is appropriate forthe installation can be found out using \fBpg_config\fR(1)..SH "EXAMPLES".PPIf you have an embedded SQL C source file named\fIprog1.pgc\fR, you can create an executableprogram using the following sequence of commands:.sp.nfecpg prog1.pgccc -I/usr/local/pgsql/include -c prog1.ccc -o prog1 prog1.o -L/usr/local/pgsql/lib -lecpg.sp.fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -