Filewatcher File Search File Search
Content Search
» » » » » » postgresql84-devel-8.4.13-1.el5_8.x86_64.rpm » Content »
pkg://postgresql84-devel-8.4.13-1.el5_8.x86_64.rpm:1563698/usr/share/man/man1/  info  HEADER  downloads

postgresql84-devel - PostgreSQL development header files and libraries…  more info»


ECPG(1)            PostgreSQL Client Applications            ECPG(1)

       ecpg - embedded SQL C preprocessor

       ecpg [ option... ]  file...

       ecpg is the embedded SQL preprocessor for C programs. It con‐
       verts C programs with embedded SQL  statements  to  normal  C
       code  by  replacing the SQL invocations with special function
       calls. The output files can then be processed with any C com‐
       piler tool chain.

       ecpg  will  convert each input file given on the command line
       to the corresponding C output file.  Input  files  preferably
       have  the extension .pgc, in which case the extension will be
       replaced by .c to determine the  output  file  name.  If  the
       extension of the input file is not .pgc, then the output file
       name is computed by appending .c to the full file name.   The
       output file name can also be overridden using the -o option.

       This  reference  page does not describe the embedded SQL lan‐
       guage.  See in the documentation for more information on that

       ecpg accepts the following command-line arguments:

       -c     Automatically  generate  certain C code from SQL code.
              Currently, this works for EXEC SQL TYPE.

       -C mode
              Set a compatibility mode.  mode  can  be  INFORMIX  or

       -D symbol
              Define a C preprocessor symbol.

       -i     Parse system include files as well.

       -I directory
              Specify an additional include path, used to find files
              included via EXEC SQL INCLUDE. Defaults are . (current
              directory), /usr/local/include, the PostgreSQL include
              directory which is defined at compile  time  (default:
              /usr/local/pgsql/include),  and  /usr/include, in that

       -o filename
              Specifies that ecpg should write all its output to the
              given filename.

       -r option
              Selects  a  run-time  behavior.  Currently, option can
              only be no_indicator.

       -t     Turn on autocommit of transactions. In this mode, each
              SQL  command  is  automatically committed unless it is
              inside an explicit transaction block. In  the  default
              mode, commands are committed only when EXEC SQL COMMIT
              is issued.

       -v     Print additional information including the version and
              the include path.

       --help Show a brief summary of the command usage, then exit.

              Output version information, then exit.

       When  compiling  the  preprocessed C code files, the compiler
       needs to be able to find the ECPG header files in  the  Post‐
       greSQL  include  directory.  Therefore, one might have to use
       the   -I   option   when   invoking   the   compiler   (e.g.,

       Programs  using  C  code  with embedded SQL have to be linked
       against the libecpg library, for  example  using  the  linker
       options -L/usr/local/pgsql/lib -lecpg.

       The  value of either of these directories that is appropriate
       for the installation can be found out using pg_config(1).

       If you have an embedded SQL C source  file  named  prog1.pgc,
       you  can  create  an  executable  program using the following
       sequence of commands:

       ecpg prog1.pgc
       cc -I/usr/local/pgsql/include -c prog1.c
       cc -o prog1 prog1.o -L/usr/local/pgsql/lib -lecpg

Application                  2012-08-14                      ECPG(1)
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017