提交 3b0453b2 编写于 作者: N Neil Conway

Various documentation improvements. Add a lot of index entries for

the builtin functions (although some more entries are still needed),
and remove the duplicate index entries that have been causing
collateindex.pl warnings. Consistently use "int" and "bigint", rather
than a mix of "int", "integer", "int4", "bigint", and "int8". Make
parenthesis style in syntax examples more consistent. Various
copy-editing for newly-added documentation and SGML markup fixes.
上级 08dc2af9
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/dfunc.sgml,v 1.31 2005/04/09 03:52:43 momjian Exp $ $PostgreSQL: pgsql/doc/src/sgml/dfunc.sgml,v 1.32 2005/09/14 21:14:26 neilc Exp $
--> -->
<sect2 id="dfunc"> <sect2 id="dfunc">
...@@ -28,11 +28,10 @@ $PostgreSQL: pgsql/doc/src/sgml/dfunc.sgml,v 1.31 2005/04/09 03:52:43 momjian Ex ...@@ -28,11 +28,10 @@ $PostgreSQL: pgsql/doc/src/sgml/dfunc.sgml,v 1.31 2005/04/09 03:52:43 momjian Ex
</para> </para>
<para> <para>
<indexterm><primary>PIC</></> Creating shared libraries is generally Creating shared libraries is generally analogous to linking
analogous to linking executables: first the source files are executables: first the source files are compiled into object files,
compiled into object files, then the object files are linked then the object files are linked together. The object files need to
together. The object files need to be created as be created as <firstterm>position-independent code</firstterm>
<firstterm>position-independent code</firstterm>
(<acronym>PIC</acronym>),<indexterm><primary>PIC</></> which (<acronym>PIC</acronym>),<indexterm><primary>PIC</></> which
conceptually means that they can be placed at an arbitrary location conceptually means that they can be placed at an arbitrary location
in memory when they are loaded by the executable. (Object files in memory when they are loaded by the executable. (Object files
......
此差异已折叠。
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.75 2005/07/02 08:59:47 neilc Exp $ $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.76 2005/09/14 21:14:26 neilc Exp $
--> -->
<chapter id="plpgsql"> <chapter id="plpgsql">
...@@ -1320,20 +1320,27 @@ EXECUTE 'UPDATE tbl SET ' ...@@ -1320,20 +1320,27 @@ EXECUTE 'UPDATE tbl SET '
</programlisting> </programlisting>
</para> </para>
<indexterm>
<primary>quote_ident</primary>
<secondary>use in PL/PgSQL</secondary>
</indexterm>
<indexterm>
<primary>quote_literal</primary>
<secondary>use in PL/PgSQL</secondary>
</indexterm>
<para> <para>
This example shows use of the functions This example demonstrates the use of the
<function>quote_ident(<type>text</type>)</function> and <function>quote_ident</function> and
<function>quote_literal(<type>text</type>)</function>.<indexterm><primary>quote_ident</><secondary>use <function>quote_literal</function> functions. For safety,
in expressions containing column and table identifiers should be
PL/pgSQL</></indexterm><indexterm><primary>quote_literal</><secondary>use passed to <function>quote_ident</function>. Expressions containing
in PL/pgSQL</></indexterm> For safety, variables containing column and values that should be literal strings in the constructed command
table identifiers should be passed to function should be passed to <function>quote_literal</function>. Both
<function>quote_ident</function>. Variables containing values take the appropriate steps to return the input text enclosed in
that should be literal strings in the constructed command should double or single quotes respectively, with any embedded special
be passed to <function>quote_literal</function>. Both take the characters properly escaped.
appropriate steps to return the input text enclosed in double or
single quotes respectively, with any embedded special characters
properly escaped.
</para> </para>
<para> <para>
...@@ -3599,11 +3606,11 @@ $$ LANGUAGE plpgsql; ...@@ -3599,11 +3606,11 @@ $$ LANGUAGE plpgsql;
The <application>PL/pgSQL</> version of The <application>PL/pgSQL</> version of
<command>EXECUTE</command> works similarly to the <command>EXECUTE</command> works similarly to the
<application>PL/SQL</> version, but you have to remember to use <application>PL/SQL</> version, but you have to remember to use
<function>quote_literal(text)</function> and <function>quote_literal</function> and
<function>quote_string(text)</function> as described in <xref <function>quote_ident</function> as described in <xref
linkend="plpgsql-statements-executing-dyn">. Constructs of the linkend="plpgsql-statements-executing-dyn">. Constructs of the
type <literal>EXECUTE 'SELECT * FROM $1';</literal> will not type <literal>EXECUTE 'SELECT * FROM $1';</literal> will not work
work unless you use these functions. unless you use these functions.
</para> </para>
</sect3> </sect3>
......
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.103 2005/05/30 23:09:07 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.104 2005/09/14 21:14:26 neilc Exp $
--> -->
<sect1 id="xfunc"> <sect1 id="xfunc">
...@@ -99,9 +99,8 @@ $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.103 2005/05/30 23:09:07 tgl Exp $ ...@@ -99,9 +99,8 @@ $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.103 2005/05/30 23:09:07 tgl Exp $
<indexterm><primary>SETOF</><seealso>function</></> Alternatively, <indexterm><primary>SETOF</><seealso>function</></> Alternatively,
an SQL function may be declared to return a set, by specifying the an SQL function may be declared to return a set, by specifying the
function's return type as <literal>SETOF function's return type as <literal>SETOF
<replaceable>sometype</></literal>.<indexterm><primary>SETOF</></> <replaceable>sometype</></literal>. In this case all rows of the
In this case all rows of the last query's result are returned. last query's result are returned. Further details appear below.
Further details appear below.
</para> </para>
<para> <para>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册