OS Manuals

/usr/bin/ecpg

A sophisticated object-relational DBMS

From postgresql-15 15.6-r5 (os), captured 2026-11-05 by running ecpg --help (exit 0). permalink

ecpg is the PostgreSQL embedded SQL preprocessor for C programs.

Usage:
  ecpg [OPTION]... FILE...

Options:
  -c             automatically generate C code from embedded SQL code;
                 this affects EXEC SQL TYPE
  -C MODE        set compatibility mode; MODE can be one of
                 "INFORMIX", "INFORMIX_SE", "ORACLE"
  -D SYMBOL      define SYMBOL
  -h             parse a header file, this option includes option "-c"
  -i             parse system include files as well
  -I DIRECTORY   search DIRECTORY for include files
  -o OUTFILE     write result to OUTFILE
  -r OPTION      specify run-time behavior; OPTION can be:
                 "no_indicator", "prepare", "questionmarks"
  --regression   run in regression testing mode
  -t             turn on autocommit of transactions
  -V, --version  output version information, then exit
  -?, --help     show this help, then exit

If no output file is specified, the name is formed by adding .c to the
input file name, after stripping off .pgc if present.

Report bugs to <pgsql-bugs@lists.postgresql.org>.
PostgreSQL home page: <https://www.postgresql.org/>
Options (12)
OptionDescriptionSource
-cautomatically generate C code from embedded SQL code;help
-C MODEset compatibility mode;help
-D SYMBOLdefine SYMBOLhelp
-hparse a header file, this option includes option "-c"help
-iparse system include files as wellhelp
-I DIRECTORYsearch DIRECTORY for include fileshelp
-o OUTFILEwrite result to OUTFILEhelp
-r OPTIONspecify run-time behavior;help
--regressionrun in regression testing modehelp
-tturn on autocommit of transactionshelp
-V, --versionoutput version information, then exithelp
-?, --helpshow this help, then exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.