OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / doc / postgresql / html / pgtcl-pgexec.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >pg_exec</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REV="MADE"
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
11 REL="HOME"
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
14 REL="UP"
15 TITLE="pgtcl Command Reference"
16 HREF="libpgtcl-ref.html"><LINK
17 REL="PREVIOUS"
18 TITLE="pg_conndefaults"
19 HREF="pgtcl-pgconndefaults.html"><LINK
20 REL="NEXT"
21 TITLE="pg_result"
22 HREF="pgtcl-pgresult.html"><LINK
23 REL="STYLESHEET"
24 TYPE="text/css"
25 HREF="stylesheet.css"><META
26 NAME="creation"
27 CONTENT="2003-12-22T03:48:47"></HEAD
28 ><BODY
29 CLASS="REFENTRY"
30 ><DIV
31 CLASS="NAVHEADER"
32 ><TABLE
33 SUMMARY="Header navigation table"
34 WIDTH="100%"
35 BORDER="0"
36 CELLPADDING="0"
37 CELLSPACING="0"
38 ><TR
39 ><TH
40 COLSPAN="5"
41 ALIGN="center"
42 VALIGN="bottom"
43 >PostgreSQL 7.4.1 Documentation</TH
44 ></TR
45 ><TR
46 ><TD
47 WIDTH="10%"
48 ALIGN="left"
49 VALIGN="top"
50 ><A
51 HREF="pgtcl-pgconndefaults.html"
52 ACCESSKEY="P"
53 >Prev</A
54 ></TD
55 ><TD
56 WIDTH="10%"
57 ALIGN="left"
58 VALIGN="top"
59 ><A
60 HREF="pgtcl-pgconndefaults.html"
61 >Fast Backward</A
62 ></TD
63 ><TD
64 WIDTH="60%"
65 ALIGN="center"
66 VALIGN="bottom"
67 ></TD
68 ><TD
69 WIDTH="10%"
70 ALIGN="right"
71 VALIGN="top"
72 ><A
73 HREF="pgtcl-pgresult.html"
74 >Fast Forward</A
75 ></TD
76 ><TD
77 WIDTH="10%"
78 ALIGN="right"
79 VALIGN="top"
80 ><A
81 HREF="pgtcl-pgresult.html"
82 ACCESSKEY="N"
83 >Next</A
84 ></TD
85 ></TR
86 ></TABLE
87 ><HR
88 ALIGN="LEFT"
89 WIDTH="100%"></DIV
90 ><H1
91 ><A
92 NAME="PGTCL-PGEXEC"
93 ></A
94 >pg_exec</H1
95 ><DIV
96 CLASS="REFNAMEDIV"
97 ><A
98 NAME="AEN22457"
99 ></A
100 ><H2
101 >Name</H2
102 >pg_exec&nbsp;--&nbsp;send a command to the server<A
103 NAME="IX-PGTCL-PGEXEC-2"
104 ></A
105 ></DIV
106 ><DIV
107 CLASS="REFSYNOPSISDIV"
108 ><A
109 NAME="AEN22462"
110 ></A
111 ><H2
112 >Synopsis</H2
113 ><PRE
114 CLASS="SYNOPSIS"
115 >pg_exec <VAR
116 CLASS="PARAMETER"
117 >conn</VAR
118 > <VAR
119 CLASS="PARAMETER"
120 >commandString</VAR
121 ></PRE
122 ></DIV
123 ><DIV
124 CLASS="REFSECT1"
125 ><A
126 NAME="AEN22466"
127 ></A
128 ><H2
129 >Description</H2
130 ><P
131 >   <CODE
132 CLASS="FUNCTION"
133 >pg_exec</CODE
134 > submits a command to the
135    <SPAN
136 CLASS="PRODUCTNAME"
137 >PostgreSQL</SPAN
138 > server and returns a result.
139    Command result handles start with the connection handle and add a
140    period and a result number.
141   </P
142 ><P
143 >   Note that lack of a Tcl error is not proof that the command
144    succeeded!  An error message returned by the server will be
145    processed as a command result with failure status, not by
146    generating a Tcl error in <CODE
147 CLASS="FUNCTION"
148 >pg_exec</CODE
149 >.
150   </P
151 ></DIV
152 ><DIV
153 CLASS="REFSECT1"
154 ><A
155 NAME="AEN22473"
156 ></A
157 ><H2
158 >Arguments</H2
159 ><P
160 ></P
161 ><DIV
162 CLASS="VARIABLELIST"
163 ><DL
164 ><DT
165 ><VAR
166 CLASS="PARAMETER"
167 >conn</VAR
168 ></DT
169 ><DD
170 ><P
171 >      The handle of the connection on which to execute the command.
172      </P
173 ></DD
174 ><DT
175 ><VAR
176 CLASS="PARAMETER"
177 >commandString</VAR
178 ></DT
179 ><DD
180 ><P
181 >      The SQL command to execute.
182      </P
183 ></DD
184 ></DL
185 ></DIV
186 ></DIV
187 ><DIV
188 CLASS="REFSECT1"
189 ><A
190 NAME="AEN22486"
191 ></A
192 ><H2
193 >Return Value</H2
194 ><P
195 >   A result handle. A Tcl error will be returned if
196    <SPAN
197 CLASS="APPLICATION"
198 >pgtcl</SPAN
199 > was unable to obtain a server
200    response.  Otherwise, a command result object is created and a
201    handle for it is returned.  This handle can be passed to
202    <CODE
203 CLASS="FUNCTION"
204 >pg_result</CODE
205 > to obtain the results of the
206    command.
207   </P
208 ></DIV
209 ><DIV
210 CLASS="NAVFOOTER"
211 ><HR
212 ALIGN="LEFT"
213 WIDTH="100%"><TABLE
214 SUMMARY="Footer navigation table"
215 WIDTH="100%"
216 BORDER="0"
217 CELLPADDING="0"
218 CELLSPACING="0"
219 ><TR
220 ><TD
221 WIDTH="33%"
222 ALIGN="left"
223 VALIGN="top"
224 ><A
225 HREF="pgtcl-pgconndefaults.html"
226 ACCESSKEY="P"
227 >Prev</A
228 ></TD
229 ><TD
230 WIDTH="34%"
231 ALIGN="center"
232 VALIGN="top"
233 ><A
234 HREF="index.html"
235 ACCESSKEY="H"
236 >Home</A
237 ></TD
238 ><TD
239 WIDTH="33%"
240 ALIGN="right"
241 VALIGN="top"
242 ><A
243 HREF="pgtcl-pgresult.html"
244 ACCESSKEY="N"
245 >Next</A
246 ></TD
247 ></TR
248 ><TR
249 ><TD
250 WIDTH="33%"
251 ALIGN="left"
252 VALIGN="top"
253 >pg_conndefaults</TD
254 ><TD
255 WIDTH="34%"
256 ALIGN="center"
257 VALIGN="top"
258 ><A
259 HREF="libpgtcl-ref.html"
260 ACCESSKEY="U"
261 >Up</A
262 ></TD
263 ><TD
264 WIDTH="33%"
265 ALIGN="right"
266 VALIGN="top"
267 >pg_result</TD
268 ></TR
269 ></TABLE
270 ></DIV
271 ></BODY
272 ></HTML
273 >