翻訳と辞書
Words near each other
・ Ecstasies (book)
・ Ecstasy
・ Ecstasy (ATB song)
・ Ecstasy (Avant album)
・ Ecstasy (comics)
・ Ecstasy (Deuter album)
・ Ecstasy (emotion)
・ Ecstasy (film)
・ Ecstasy (Gill sculpture)
・ Ecstasy (Jody Watley song)
・ Ecstasy (Lou Reed album)
・ ECPD
・ Ecpeptamena
・ Ecpetala
・ Ecpetelia
ECPG
・ Ecphantus the Pythagorean
・ Ecphonesis
・ Ecphora
・ Ecphora (genus)
・ Ecphora gardnerae
・ Ecphorella
・ Ecphyas
・ Ecphysis
・ ECPI University
・ ECPlaza
・ Ecpleopus
・ Ecpod.com
・ ECPP
・ Ecprepaulax


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

ECPG : ウィキペディア英語版
ECPG

ECPG is the standard, in the PostgreSQL database built-in, client programming interface for embedding SQL in programs written in the C programming language. It provides the option for accessing the PostgreSQL database directly from the C code in the application, using SQL commands.
== Usage ==

The usage can be divided to 2 steps. First, a .pcg file has to be created, which consists of C code with embedded SQL code. In such file SQL code will be inserted directly to the application's C code. The SQL commands have to be inserted into the C code in following way:

// ... C code ...
EXEC SQL ;
// ... C code ...

An example how to connect to a database:

EXEC SQL CONNECT TO databasename()() (connectionname ) (username );

The embedded SQL part will be processed trough ECPG preprocessor where SQL code will be replaced with the calls to the ecpg library (libecpg.a or libecpg.so). The .pcg file will be also preprocessed with ecpg, which converts it to a .c file according to the ANSI standards. Therefore, in the second step, the generated .c file can be directly compiled with a standard C compiler.
Following command will create from the ''my_c_file_with_embedded_sql_commands.pcg'' file a ''my_c_file_with_embedded_sql_commands.c'' file, which can be processed further as a pure C code.

$ ecpg my_c_file_with_embedded_sql_commands.pcg

There is also source code of the ecpg available in the (PostgreSQL Source Code git ) repository.
Note: While compiling the preprocessed .c code, do not forget to link the ecpg library (libepcg), so that the generated calls can find their linked methods.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「ECPG」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.