Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit28e8206

Browse files
committed
PREPARE/EXECUTE statements. Patch by Neil Conway, some kibitzing
from Tom Lane.
1 parentbc8f725 commit28e8206

File tree

24 files changed

+1512
-55
lines changed

24 files changed

+1512
-55
lines changed

‎doc/src/sgml/ref/allfiles.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.47 2002/08/2703:38:27 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.48 2002/08/2704:55:07 tgl Exp $
33
PostgreSQL documentation
44
Complete list of usable sgml source files in this directory.
55
-->
@@ -71,6 +71,7 @@ Complete list of usable sgml source files in this directory.
7171
<!entity createType system "create_type.sgml">
7272
<!entity createUser system "create_user.sgml">
7373
<!entity createView system "create_view.sgml">
74+
<!entity deallocate system "deallocate.sgml">
7475
<!entity declare system "declare.sgml">
7576
<!entity delete system "delete.sgml">
7677
<!entity dropAggregate system "drop_aggregate.sgml">
@@ -93,6 +94,7 @@ Complete list of usable sgml source files in this directory.
9394
<!entity dropUser system "drop_user.sgml">
9495
<!entity dropView system "drop_view.sgml">
9596
<!entity end system "end.sgml">
97+
<!entity execute system "execute.sgml">
9698
<!entity explain system "explain.sgml">
9799
<!entity fetch system "fetch.sgml">
98100
<!entity grant system "grant.sgml">
@@ -102,6 +104,7 @@ Complete list of usable sgml source files in this directory.
102104
<!entity lock system "lock.sgml">
103105
<!entity move system "move.sgml">
104106
<!entity notify system "notify.sgml">
107+
<!entity prepare system "prepare.sgml">
105108
<!entity reindex system "reindex.sgml">
106109
<!entity reset system "reset.sgml">
107110
<!entity revoke system "revoke.sgml">

‎doc/src/sgml/ref/deallocate.sgml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/deallocate.sgml,v 1.1 2002/08/27 04:55:07 tgl Exp $
3+
PostgreSQL documentation
4+
-->
5+
6+
<refentry id="SQL-DEALLOCATE">
7+
<refmeta>
8+
<refentrytitle id="sql-deallocate-title">DEALLOCATE</refentrytitle>
9+
<refmiscinfo>SQL - Language Statements</refmiscinfo>
10+
</refmeta>
11+
<refnamediv>
12+
<refname>
13+
DEALLOCATE
14+
</refname>
15+
<refpurpose>
16+
remove a prepared query
17+
</refpurpose>
18+
</refnamediv>
19+
<refsynopsisdiv>
20+
<refsynopsisdivinfo>
21+
<date>2002-08-12</date>
22+
</refsynopsisdivinfo>
23+
<synopsis>
24+
DEALLOCATE [ PREPARE ] <replaceable class="PARAMETER">plan_name</replaceable>
25+
</synopsis>
26+
27+
<refsect2 id="R2-SQL-DEALLOCATE-1">
28+
<refsect2info>
29+
<date>2002-08-12</date>
30+
</refsect2info>
31+
<title>
32+
Inputs
33+
</title>
34+
35+
<para>
36+
<variablelist>
37+
<varlistentry>
38+
<term>PREPARE</term>
39+
<listitem>
40+
<para>
41+
This keyword is ignored.
42+
</para>
43+
</listitem>
44+
</varlistentry>
45+
<varlistentry>
46+
<term><replaceable class="PARAMETER">plan_name</replaceable></term>
47+
<listitem>
48+
<para>
49+
The name of the prepared query to remove.
50+
</para>
51+
</listitem>
52+
</varlistentry>
53+
</variablelist>
54+
</para>
55+
</refsect2>
56+
<refsect2 id="R2-SQL-DEALLOCATE-2">
57+
<refsect2info>
58+
<date>2002-08-12</date>
59+
</refsect2info>
60+
<title>
61+
Outputs
62+
</title>
63+
<para>
64+
65+
<variablelist>
66+
<varlistentry>
67+
<term><computeroutput>
68+
<returnvalue>DEALLOCATE</returnvalue>
69+
</computeroutput></term>
70+
<listitem>
71+
<para>
72+
The prepared query was removed successfully.
73+
</para>
74+
</listitem>
75+
</varlistentry>
76+
</variablelist>
77+
</para>
78+
</refsect2>
79+
</refsynopsisdiv>
80+
81+
<refsect1 id="R1-SQL-DEALLOCATE-1">
82+
<refsect1info>
83+
<date>2002-08-12</date>
84+
</refsect1info>
85+
<title>
86+
Description
87+
</title>
88+
89+
<para>
90+
<command>DEALLOCATE</command> is used to remove a previously
91+
prepared query. If you do not explicitly
92+
<command>DEALLOCATE</command> a prepared query, it is removed when
93+
the session ends.
94+
</para>
95+
96+
<para>
97+
For more information on prepared queries, see <xref
98+
linkend="sql-prepare" endterm="sql-prepare-title">.
99+
</para>
100+
</refsect1>
101+
102+
<refsect1 id="R1-SQL-DEALLOCATE-2">
103+
<title>
104+
Compatibility
105+
</title>
106+
107+
<refsect2 id="R2-SQL-DEALLOCATE-3">
108+
<refsect2info>
109+
<date>2002-08-12</date>
110+
</refsect2info>
111+
<title>
112+
SQL92
113+
</title>
114+
<para>
115+
SQL92 includes a <command>DEALLOCATE</command> statement, but it is
116+
only for use in embedded SQL clients.
117+
</para>
118+
</refsect2>
119+
</refsect1>
120+
</refentry>
121+
122+
<!-- Keep this comment at the end of the file
123+
Local variables:
124+
mode: sgml
125+
sgml-omittag:nil
126+
sgml-shorttag:t
127+
sgml-minimize-attributes:nil
128+
sgml-always-quote-attributes:t
129+
sgml-indent-step:1
130+
sgml-indent-data:t
131+
sgml-parent-document:nil
132+
sgml-default-dtd-file:"../reference.ced"
133+
sgml-exposed-tags:nil
134+
sgml-local-catalogs:"/usr/lib/sgml/catalog"
135+
sgml-local-ecat-files:nil
136+
End:
137+
-->

‎doc/src/sgml/ref/execute.sgml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/execute.sgml,v 1.1 2002/08/27 04:55:07 tgl Exp $
3+
PostgreSQL documentation
4+
-->
5+
6+
<refentry id="SQL-EXECUTE">
7+
<refmeta>
8+
<refentrytitle id="sql-execute-title">EXECUTE</refentrytitle>
9+
<refmiscinfo>SQL - Language Statements</refmiscinfo>
10+
</refmeta>
11+
<refnamediv>
12+
<refname>
13+
EXECUTE
14+
</refname>
15+
<refpurpose>
16+
execute a prepared query
17+
</refpurpose>
18+
</refnamediv>
19+
<refsynopsisdiv>
20+
<refsynopsisdivinfo>
21+
<date>2002-08-12</date>
22+
</refsynopsisdivinfo>
23+
<synopsis>
24+
EXECUTE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable class="PARAMETER">parameter</replaceable> [, ...] ) ]
25+
</synopsis>
26+
27+
<refsect2 id="R2-SQL-EXECUTE-1">
28+
<refsect2info>
29+
<date>2002-08-12</date>
30+
</refsect2info>
31+
<title>
32+
Inputs
33+
</title>
34+
35+
<para>
36+
<variablelist>
37+
<varlistentry>
38+
<term><replaceable class="PARAMETER">plan_name</replaceable></term>
39+
<listitem>
40+
<para>
41+
The name of the prepared query to execute.
42+
</para>
43+
</listitem>
44+
</varlistentry>
45+
<varlistentry>
46+
<term><replaceable class="PARAMETER">parameter</replaceable></term>
47+
<listitem>
48+
<para>
49+
The actual value of a parameter to the prepared query.
50+
This must be an expression yielding a value of a type
51+
compatible with
52+
the data-type specified for this parameter position in the
53+
<command>PREPARE</command> statement that created the prepared
54+
query.
55+
</para>
56+
</listitem>
57+
</varlistentry>
58+
</variablelist>
59+
</para>
60+
</refsect2>
61+
</refsynopsisdiv>
62+
63+
<refsect1 id="R1-SQL-EXECUTE-1">
64+
<refsect1info>
65+
<date>2002-08-12</date>
66+
</refsect1info>
67+
<title>
68+
Description
69+
</title>
70+
71+
<para>
72+
<command>EXECUTE</command> is used to execute a previously prepared
73+
query. Since prepared queries only exist for the duration of a
74+
session, the prepared query must have been created by a
75+
<command>PREPARE</command> statement executed earlier in the
76+
current session.
77+
</para>
78+
79+
<para>
80+
If the <command>PREPARE</command> statement that created the query
81+
specified some parameters, a compatible set of parameters must be
82+
passed to the <command>EXECUTE</command> statement, or else an
83+
error is raised. Note that (unlike functions) prepared queries are
84+
not overloaded based on the type or number of their parameters: the
85+
name of a prepared query must be unique within a database session.
86+
</para>
87+
88+
<para>
89+
For more information on the creation and usage of prepared queries,
90+
see <xref linkend="sql-prepare" endterm="sql-prepare-title">.
91+
</para>
92+
</refsect1>
93+
94+
<refsect1 id="R1-SQL-EXECUTE-2">
95+
<title>
96+
Compatibility
97+
</title>
98+
99+
<refsect2 id="R2-SQL-EXECUTE-2">
100+
<refsect2info>
101+
<date>2002-08-12</date>
102+
</refsect2info>
103+
<title>
104+
SQL92
105+
</title>
106+
<para>
107+
SQL92 includes an <command>EXECUTE</command> statement, but it is
108+
only for use in embedded SQL clients. The
109+
<command>EXECUTE</command> statement implemented by
110+
<productname>PostgreSQL</productname> also uses a somewhat
111+
different syntax.
112+
</para>
113+
</refsect2>
114+
</refsect1>
115+
</refentry>
116+
117+
<!-- Keep this comment at the end of the file
118+
Local variables:
119+
mode: sgml
120+
sgml-omittag:nil
121+
sgml-shorttag:t
122+
sgml-minimize-attributes:nil
123+
sgml-always-quote-attributes:t
124+
sgml-indent-step:1
125+
sgml-indent-data:t
126+
sgml-parent-document:nil
127+
sgml-default-dtd-file:"../reference.ced"
128+
sgml-exposed-tags:nil
129+
sgml-local-catalogs:"/usr/lib/sgml/catalog"
130+
sgml-local-ecat-files:nil
131+
End:
132+
-->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp