From be2b660ecd5ca205570825633e7b8479379ddc64 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 19 Jan 2003 00:13:31 +0000 Subject: [PATCH] This patch includes a lot of minor cleanups to the SGML documentation, including: - replacing all the appropriate usages of PostgreSQL ... with &cite-user;, &cite-admin;, and so on - fix an omission in the EXECUTE documentation - add some more text to the EXPLAIN documentation - improve the PL/PgSQL RETURN NEXT documentation (more work to do here) - minor markup fixes Neil Conway --- doc/src/sgml/arch-dev.sgml | 6 +- doc/src/sgml/catalogs.sgml | 35 ++- doc/src/sgml/charset.sgml | 6 +- doc/src/sgml/client-auth.sgml | 35 ++- doc/src/sgml/dfunc.sgml | 7 +- doc/src/sgml/ecpg.sgml | 4 +- doc/src/sgml/extend.sgml | 6 +- doc/src/sgml/history.sgml | 6 +- doc/src/sgml/info.sgml | 9 +- doc/src/sgml/installation.sgml | 25 +- doc/src/sgml/jdbc.sgml | 8 +- doc/src/sgml/libpq.sgml | 4 +- doc/src/sgml/notation.sgml | 4 +- doc/src/sgml/plpgsql.sgml | 341 +++++++++++++----------- doc/src/sgml/ref/alter_database.sgml | 6 +- doc/src/sgml/ref/alter_table.sgml | 7 +- doc/src/sgml/ref/alter_user.sgml | 6 +- doc/src/sgml/ref/analyze.sgml | 5 +- doc/src/sgml/ref/begin.sgml | 7 +- doc/src/sgml/ref/checkpoint.sgml | 24 +- doc/src/sgml/ref/create_aggregate.sgml | 7 +- doc/src/sgml/ref/create_cast.sgml | 4 +- doc/src/sgml/ref/create_conversion.sgml | 4 +- doc/src/sgml/ref/create_database.sgml | 4 +- doc/src/sgml/ref/create_domain.sgml | 6 +- doc/src/sgml/ref/create_function.sgml | 7 +- doc/src/sgml/ref/create_group.sgml | 10 +- doc/src/sgml/ref/create_language.sgml | 9 +- doc/src/sgml/ref/create_opclass.sgml | 5 +- doc/src/sgml/ref/create_operator.sgml | 5 +- doc/src/sgml/ref/create_sequence.sgml | 4 +- doc/src/sgml/ref/create_table.sgml | 6 +- doc/src/sgml/ref/create_trigger.sgml | 9 +- doc/src/sgml/ref/create_type.sgml | 4 +- doc/src/sgml/ref/create_user.sgml | 20 +- doc/src/sgml/ref/drop_aggregate.sgml | 7 +- doc/src/sgml/ref/ecpg-ref.sgml | 8 +- doc/src/sgml/ref/execute.sgml | 35 ++- doc/src/sgml/ref/explain.sgml | 35 ++- doc/src/sgml/ref/initdb.sgml | 4 +- doc/src/sgml/ref/initlocation.sgml | 4 +- doc/src/sgml/ref/insert.sgml | 5 +- doc/src/sgml/ref/load.sgml | 8 +- doc/src/sgml/ref/pg_config-ref.sgml | 21 +- doc/src/sgml/ref/pg_ctl-ref.sgml | 4 +- doc/src/sgml/ref/pg_dump.sgml | 4 +- doc/src/sgml/ref/pg_restore.sgml | 4 +- doc/src/sgml/ref/pgtclsh.sgml | 4 +- doc/src/sgml/ref/pgtksh.sgml | 4 +- doc/src/sgml/ref/postgres-ref.sgml | 15 +- doc/src/sgml/ref/postmaster.sgml | 27 +- doc/src/sgml/ref/reset.sgml | 4 +- doc/src/sgml/ref/select.sgml | 128 ++++----- doc/src/sgml/ref/set.sgml | 21 +- doc/src/sgml/ref/set_transaction.sgml | 10 +- doc/src/sgml/ref/show.sgml | 14 +- doc/src/sgml/ref/vacuum.sgml | 4 +- doc/src/sgml/xaggr.sgml | 5 +- doc/src/sgml/xfunc.sgml | 6 +- 59 files changed, 562 insertions(+), 474 deletions(-) diff --git a/doc/src/sgml/arch-dev.sgml b/doc/src/sgml/arch-dev.sgml index cbc34957665..05dba36ff91 100644 --- a/doc/src/sgml/arch-dev.sgml +++ b/doc/src/sgml/arch-dev.sgml @@ -1,5 +1,5 @@ @@ -478,8 +478,8 @@ current context are performed. For information on the syntax and creation of rules in the - PostgreSQL system refer to - The PostgreSQL User's Guide. + PostgreSQL system refer to the + &cite-user;. diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index af8dee9f565..4d38bef2370 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1,6 +1,6 @@ @@ -288,9 +288,9 @@ New aggregate functions are registered with the CREATE - AGGREGATE command. See the Programmer's - Guide for more information about writing aggregate - functions and the meaning of the transition functions, etc. + AGGREGATE command. See the &cite-programmer; for more + information about writing aggregate functions and the meaning of + the transition functions, etc. @@ -1446,8 +1446,8 @@ The pg_database catalog stores information about the available databases. Databases are created with the CREATE DATABASE command. Consult the - Administrator's Guide for details about the - meaning of some of the parameters. + &cite-admin; for details about the meaning of some of the + parameters. @@ -1791,8 +1791,8 @@ This catalog defines groups and stores what users belong to what groups. Groups are created with the CREATE - GROUP command. Consult the Administrator's - Guide for information about user permission management. + GROUP command. Consult the &cite-admin; for information + about user permission management. @@ -2022,8 +2022,7 @@ pg_language registers call interfaces or languages in which you can write functions or stored procedures. See under CREATE LANGUAGE and in the - Programmer's Guide for more information - about language handlers. + &cite-programmer; for more information about language handlers. @@ -2298,8 +2297,7 @@ - Operator classes are described at length in the - Programmer's Guide. + Operator classes are described at length in the &cite-programmer;.
@@ -2387,9 +2385,8 @@ pg_operator - See CREATE OPERATOR and the - Programmer's Guide for details on these - operator parameters. + See CREATE OPERATOR and the &cite-programmer; + for details on these operator parameters.
@@ -2559,8 +2556,8 @@ This catalog stores information about functions (or procedures). The description of CREATE FUNCTION and the - Programmer's Guide contain more information - about the meaning of some fields. + &cite-programmer; contain more information about the meaning of + some fields. @@ -2832,8 +2829,8 @@ - The Administrator's Guide contains detailed - information about user and permission management. + The &cite-admin; contains detailed information about user and + permission management. diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml index 9aa9c614466..fc0868d13b3 100644 --- a/doc/src/sgml/charset.sgml +++ b/doc/src/sgml/charset.sgml @@ -1,4 +1,4 @@ - + Localization</> @@ -309,8 +309,8 @@ perl: warning: Falling back to the standard locale ("C"). <productname>PostgreSQL</> speak their preferred language well. If messages in your language is currently not available or fully translated, your assistance would be appreciated. If you want to - help, refer to the <citetitle>Developer's Guide</> or write to the - developers' mailing list. + help, refer to the &cite-developer; or write to the developers' + mailing list. </para> </sect2> </sect1> diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 8e28e3e17a3..574fc506952 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.43 2003/01/06 03:18:26 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.44 2003/01/19 00:13:28 momjian Exp $ --> <chapter id="client-authentication"> @@ -110,8 +110,7 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> < This record matches connection attempts using TCP/IP networks. Note that TCP/IP connections are disabled unless the server is started with the <option>-i</option> option or the - <literal>tcpip_socket</> <filename>postgresql.conf</> - configuration parameter is enabled. + <varname>tcpip_socket</> configuration parameter is enabled. </para> </listitem> </varlistentry> @@ -129,9 +128,8 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> < <para> To be able make use of this option the server must be built with SSL support enabled. Furthermore, SSL must be enabled by - enabling the option <literal>ssl</literal> in - <filename>postgresql.conf</filename> (see <xref - linkend="runtime-config">). + enabling the <varname>ssl</varname> configuration parameter + (see <xref linkend="runtime-config"> for more information). </para> </listitem> </varlistentry> @@ -191,8 +189,8 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> < must be zero for the record to match. (Of course IP addresses can be spoofed but this consideration is beyond the scope of <productname>PostgreSQL</productname>.) If you machine supports - IPv6, the default <filename>pg_hba.conf</> will have an IPv6 - entry for <literal>localhost</>. You can add your own IPv6 + IPv6, the default <filename>pg_hba.conf</> file will have an + IPv6 entry for <literal>localhost</>. You can add your own IPv6 entries to the file. IPv6 entries are used only for IPv6 connections. </para> @@ -486,17 +484,18 @@ local db1,db2,@demodbs all md5 </para> <para> - <literal>trust</> authentication is appropriate and very convenient - for local connections on a single-user workstation. It is usually - <emphasis>not</> appropriate by itself on a multiuser machine. - However, you may be able to use <literal>trust</> even on a multiuser - machine, if you restrict access to the postmaster's socket file using - file-system permissions. To do this, set the parameter + <literal>trust</> authentication is appropriate and very + convenient for local connections on a single-user workstation. It + is usually <emphasis>not</> appropriate by itself on a multiuser + machine. However, you may be able to use <literal>trust</> even + on a multiuser machine, if you restrict access to the postmaster's + socket file using file-system permissions. To do this, set the <varname>unix_socket_permissions</varname> (and possibly - <varname>unix_socket_group</varname>) in <filename>postgresql.conf</>, - as described in <xref linkend="runtime-config-general">. Or you could - set <varname>unix_socket_directory</varname> to place the socket file - in a suitably restricted directory. + <varname>unix_socket_group</varname>) configuration parameters as + described in <xref linkend="runtime-config-general">. Or you + could set the <varname>unix_socket_directory</varname> + configuration parameter to place the socket file in a suitably + restricted directory. </para> <para> diff --git a/doc/src/sgml/dfunc.sgml b/doc/src/sgml/dfunc.sgml index 20393a8664e..86758f83978 100644 --- a/doc/src/sgml/dfunc.sgml +++ b/doc/src/sgml/dfunc.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.22 2002/09/21 18:32:52 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.23 2003/01/19 00:13:28 momjian Exp $ --> <sect2 id="dfunc"> @@ -318,9 +318,8 @@ ld <other flags> -H512 -T512 -o foo.so -e _nostart \e -bI:.../lib/postgres.exp -bE:foo.exp foo.o \e -lm -lc 2>/dev/null .fi -You should look at the <citetitle>PostgreSQL User's Manual</> -for an explanation of this -procedure. +You should look at the &cite-user; for an explanation of +this procedure. --> diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 719004a2c80..a39c694e475 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.40 2002/11/15 03:11:16 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.41 2003/01/19 00:13:28 momjian Exp $ --> <chapter id="ecpg"> @@ -879,7 +879,7 @@ ECPG = ecpg FETCH <optional><replaceable>direction</></> <optional><replaceable>amount</></> IN|FROM <replaceable>cursor</replaceable> </synopsis> <indexterm><primary>Oracle</></> - <application>Oracle</application>, however, does not use the + <productname>Oracle</productname>, however, does not use the keywords <literal>IN</literal> or <literal>FROM</literal>. This feature cannot be added since it would create parsing conflicts. </para> diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 438a8ec8795..22cf5a0ac7e 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.18 2002/11/03 01:31:32 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.19 2003/01/19 00:13:28 momjian Exp $ --> <chapter id="extend"> @@ -214,8 +214,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.18 2002/11/03 01:31:32 momj </mediaobject> </figure> - The <citetitle>Developer's Guide</citetitle> gives a more detailed explanation - of these catalogs and their columns. However, + The &cite-developer; gives a more detailed explanation of these + catalogs and their columns. However, <xref linkend="EXTEND-CATALOGS"> shows the major entities and their relationships in the system catalogs. (Columns that do not refer diff --git a/doc/src/sgml/history.sgml b/doc/src/sgml/history.sgml index 8f2d74117b5..6e64f7e6026 100644 --- a/doc/src/sgml/history.sgml +++ b/doc/src/sgml/history.sgml @@ -1,9 +1,9 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.19 2002/01/07 02:29:12 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.20 2003/01/19 00:13:28 momjian Exp $ --> <sect1 id="history"> - <title>A Short History of <productname>PostgreSQL</productname> + A Brief History of <productname>PostgreSQL</productname> The object-relational database management system now known as @@ -54,7 +54,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.19 2002/01/07 02:29:12 pet released in June 1990 with the new rule system. Version 3 appeared in 1991 and added support for multiple storage managers, an improved query executor, and a - rewritten rewrite rule system. For the most part, subsequent + rewritten rule system. For the most part, subsequent releases until Postgres95 (see below) focused on portability and reliability. diff --git a/doc/src/sgml/info.sgml b/doc/src/sgml/info.sgml index a7022e88772..62d754d1337 100644 --- a/doc/src/sgml/info.sgml +++ b/doc/src/sgml/info.sgml @@ -1,5 +1,5 @@ @@ -71,8 +71,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.17 2002/11/15 03:11:16 momjia Information for PostgreSQL developers. This is intended for those who are contributing to the PostgreSQL project; application - development information appears in the Programmer's - Guide. + development information appears in the &cite-programmer;. @@ -88,8 +87,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.17 2002/11/15 03:11:16 momjia man pages - The Reference Manual's pages in the - traditional Unix man format. There is no difference in content. + The &cite-reference;'s pages in the traditional Unix man + format. There is no difference in content. diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index eb15e5e047b..cc247620060 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,4 +1,4 @@ - + <![%standalone-include[<productname>PostgreSQL</>]]> @@ -656,8 +656,8 @@ JAVACMD=$JAVA_HOME/bin/java internal header files and the server header files are installed into private directories under <varname>includedir</varname>. - See the <citetitle>Programmer's Guide</citetitle> for - information about how to get at the header files for each interface. + See the &cite-programmer; for information about how to get at + the header files for each interface. Finally, a private subdirectory will also be created, if appropriate, under <varname>libdir</varname> for dynamically loadable modules. </para> @@ -1311,8 +1311,7 @@ export MANPATH <para> The following is a quick summary of how to get <productname>PostgreSQL</> up and - running once installed. The <citetitle>Administrator's Guide</> - contains more information. + running once installed. The &cite-admin; contains more information. </para> <procedure> @@ -1418,12 +1417,11 @@ kill `cat /usr/local/pgsql/data/postmaster.pid` </para> <para> - The <citetitle>Tutorial</> should be your first reading if you - are completely new to <acronym>SQL</> databases. - If you are familiar with database concepts then you want to - proceed with the <citetitle>Administrator's Guide</citetitle>, - which contains information about how to set up the database - server, database users, and authentication. + The &cite-tutorial; should be your first reading if you are + completely new to <acronym>SQL</> databases. If you are + familiar with database concepts then you want to proceed with + the &cite-admin;, which contains information about how to set up + the database server, database users, and authentication. </para> </listitem> @@ -1431,8 +1429,7 @@ kill `cat /usr/local/pgsql/data/postmaster.pid` <para> Usually, you will want to modify your computer so that it will automatically start the database server whenever it boots. Some - suggestions for this are in the <citetitle>Administrator's - Guide</citetitle>. + suggestions for this are in the &cite-admin;. </para> </listitem> @@ -1441,7 +1438,7 @@ kill `cat /usr/local/pgsql/data/postmaster.pid` Run the regression tests against the installed server (using the sequential test method). If you didn't run the tests before installation, you should definitely do it now. This is also - explained in the <citetitle>Administrator's Guide</citetitle>. + explained in the &cite-admin;. </para> </listitem> diff --git a/doc/src/sgml/jdbc.sgml b/doc/src/sgml/jdbc.sgml index cb7a94c30e8..574e20225ae 100644 --- a/doc/src/sgml/jdbc.sgml +++ b/doc/src/sgml/jdbc.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.41 2002/11/15 03:11:16 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.42 2003/01/19 00:13:28 momjian Exp $ --> <chapter id="jdbc"> @@ -124,9 +124,9 @@ java Finder <para> Also, the client authentication setup in the <filename>pg_hba.conf</filename> file may need to be configured. - Refer to the <citetitle>Administrator's Guide</citetitle> for - details. The <acronym>JDBC</acronym> Driver supports the trust, - ident, password, md5, and crypt authentication methods. + Refer to the &cite-admin; for details. The + <acronym>JDBC</acronym> Driver supports the trust, ident, + password, md5, and crypt authentication methods. </para> </sect2> </sect1> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 6dbc13ede2f..562604f182d 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.105 2003/01/07 04:25:29 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.106 2003/01/19 00:13:28 momjian Exp $ --> <chapter id="libpq"> @@ -952,7 +952,7 @@ strings overlap. escape a character, it is converted into the three digit octal number equal to the decimal <acronym>ASCII</acronym> value, and preceded by two backslashes. The single quote (') and backslash (\) characters have - special alternate escape sequences. See the <citetitle>User's Guide</citetitle> + special alternate escape sequences. See the &cite-user; for more information. <function>PQescapeBytea </function> performs this operation, escaping only the minimally required characters. diff --git a/doc/src/sgml/notation.sgml b/doc/src/sgml/notation.sgml index 197e5cd913e..8c995203501 100644 --- a/doc/src/sgml/notation.sgml +++ b/doc/src/sgml/notation.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.20 2002/10/24 17:48:54 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.21 2003/01/19 00:13:28 momjian Exp $ --> <sect1 id="notation"> @@ -18,7 +18,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.20 2002/10/24 17:48:54 pe We use <filename>/usr/local/pgsql/</filename> as the root directory of the installation and <filename>/usr/local/pgsql/data</filename> as the directory with the database files. These directories may vary - on your site, details can be derived in the <citetitle>Administrator's Guide</citetitle>. + on your site, details can be derived in the &cite-admin;. </para> <para> diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 30adbd1dd9b..999b9805a2e 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.13 2003/01/15 16:40:24 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.14 2003/01/19 00:13:28 momjian Exp $ --> <chapter id="plpgsql"> @@ -230,7 +230,7 @@ END; <para> Developing in <application>PL/pgSQL</application> is pretty straight forward, especially if you have developed in other - database procedural languages, such as Oracle's + database procedural languages, such as <productname>Oracle</>'s <application>PL/SQL</application>. One good way to develop in <application>PL/pgSQL</> is to simply use the text editor of your choice to create your functions, and in another window, use @@ -1155,84 +1155,109 @@ GET DIAGNOSTICS <replaceable>variable</replaceable> = <replaceable>item</replace <title>Returning from a function + There are two commands available that allow you to return data + from a function: RETURN and RETURN + NEXT. + + + + <command>RETURN</> + + RETURN expression; - RETURN with an expression is used to return - from a PL/pgSQL function that does not return a - set. The function terminates and the value of - expression is returned to the caller. - + RETURN with an expression is used to return + from a PL/pgSQL function that does not return a + set. The function terminates and the value of + expression is returned to the caller. + - - To return a composite (row) value, you must write a record or row - variable as the expression. When - returning a scalar type, any expression can be used. - The expression's result will be automatically cast into the - function's return type as described for assignments. - (If you have declared the function to return void, - then the expression can be omitted, and will be ignored in any case.) - + + To return a composite (row) value, you must write a record or row + variable as the expression. When + returning a scalar type, any expression can be used. + The expression's result will be automatically cast into the + function's return type as described for assignments. + - - The return value of a function cannot be left undefined. If - control reaches the end of the top-level block of the function - without hitting a RETURN statement, a run-time - error will occur. - + + The return value of a function cannot be left undefined. If + control reaches the end of the top-level block of the function + without hitting a RETURN statement, a run-time + error will occur. Note that if you have declared the function to + return void, a RETURN statement + must still be specified; however, the expression following + RETURN is optional, and will be ignored in + any case. + + - - When a PL/pgSQL function is declared to return - SETOF sometype, the procedure - to follow is slightly different. In that case, the individual - items to return are specified in RETURN NEXT - commands, and then a final RETURN command with - no arguments is used to indicate that the function has finished - executing. RETURN NEXT can be used with both - scalar and composite data types; in the later case, an entire - "table" of results will be returned. Functions that use - RETURN NEXT should be called in the following - fashion: - - -SELECT * FROM some_func(); - - - That is, the function is used as a table source in a FROM clause. + + <command>RETURN NEXT</> RETURN NEXT expression; - RETURN NEXT does not actually return from the - function; it simply saves away the value of the expression (or - record or row variable, as appropriate for the data type being - returned). Execution then continues with the next statement in - the PL/pgSQL function. As successive - RETURN NEXT commands are executed, the result - set is built up. A final RETURN, which need - have no argument, causes control to exit the function. - + + When a PL/pgSQL function is declared to return + SETOF sometype, the procedure + to follow is slightly different. In that case, the individual + items to return are specified in RETURN NEXT + commands, and then a final RETURN command + with no arguments is used to indicate that the function has + finished executing. RETURN NEXT can be used + with both scalar and composite data types; in the later case, an + entire table of results will be returned. + Functions that use RETURN NEXT should be + called in the following fashion: - - - The current implementation of RETURN NEXT for - PL/pgSQL stores the entire result set before - returning from the function, as discussed above. That means that - if a PL/pgSQL function produces a very large result set, - performance may be poor: data will be written to disk to avoid - memory exhaustion, but the function itself will not return until - the entire result set has been generated. A future version of - PL/pgSQL may allow users to allow users to define set-returning - functions that do not have this limitation. Currently, the point - at which data begins being written to disk is controlled by the - SORT_MEM configuration variable. Administrators who - have sufficient memory to store larger result sets in memory - should consider increasing this parameter. - - - + +SELECT * FROM some_func(); + + + That is, the function is used as a table source in a FROM + clause. + + + + RETURN NEXT does not actually return from the + function; it simply saves away the value of the expression (or + record or row variable, as appropriate for the data type being + returned). Execution then continues with the next statement in + the PL/pgSQL function. As successive + RETURN NEXT commands are executed, the result + set is built up. A final RETURN, which should + have no argument, causes control to exit the function. + + + + For more information on using set-returning functions in + PostgreSQL, refer to XXX. + + + The current implementation of RETURN NEXT + for PL/pgSQL stores the entire result set + before returning from the function, as discussed above. That + means that if a PL/pgSQL function produces a + very large result set, performance may be poor: data will be + written to disk to avoid memory exhaustion, but the function + itself will not return until the entire result set has been + generated. A future version of PL/pgSQL may + allow users to allow users to define set-returning functions + that do not have this limitation. Currently, the point at + which data begins being written to disk is controlled by the + SORT_MEM configuration variable. Administrators + who have sufficient memory to store larger result sets in + memory should consider increasing this parameter. + + + + Conditionals @@ -1267,9 +1292,11 @@ IF boolean-expression THEN END IF; - IF-THEN statements are the simplest form of IF. The - statements between THEN and END IF will be executed if - the condition is true. Otherwise, they are skipped. + IF-THEN statements are the simplest form of + IF. The statements between + THEN and END IF will be + executed if the condition is true. Otherwise, they are + skipped. IF v_user_id <> 0 THEN @@ -1291,9 +1318,10 @@ ELSE END IF; - IF-THEN-ELSE statements add to IF-THEN by letting you - specify an alternative set of statements that should be executed if - the condition evaluates to FALSE. + IF-THEN-ELSE statements add to + IF-THEN by letting you specify an + alternative set of statements that should be executed if the + condition evaluates to FALSE. IF parentid IS NULL or parentid = '''' @@ -1311,14 +1339,16 @@ ELSE return ''f''; END IF; - - + + <literal>IF-THEN-ELSE IF</> - IF statements can be nested, as in the following example: + IF statements can be nested, as in the + following example: + IF demo_row.sex = ''m'' THEN pretty_sex := ''man''; @@ -1331,12 +1361,13 @@ END IF; - When you use this form, you are actually - nesting an IF statement inside the ELSE part of an outer IF - statement. Thus you need one END IF statement for each - nested IF and one for the parent IF-ELSE. - This is workable but grows tedious when there are many - alternatives to be checked. + When you use this form, you are actually nesting an + IF statement inside the + ELSE part of an outer IF + statement. Thus you need one END IF + statement for each nested IF and one for the parent + IF-ELSE. This is workable but grows + tedious when there are many alternatives to be checked. @@ -1384,7 +1415,7 @@ END IF; - The final ELSE section is optional. + The final ELSE statement is optional. @@ -1399,10 +1430,10 @@ END IF; a series of commands. - - LOOP + + LOOP - + <<label>> LOOP @@ -1410,13 +1441,13 @@ LOOP END LOOP; - LOOP defines an unconditional loop that is repeated indefinitely - until terminated by an EXIT or RETURN statement. - The optional label can be used by - EXIT statements in nested loops to specify which level of - nesting should be terminated. - - + LOOP defines an unconditional loop that is repeated indefinitely + until terminated by an EXIT or RETURN + statement. The optional label can be used by EXIT statements in + nested loops to specify which level of nesting should be + terminated. + + EXIT @@ -1547,9 +1578,9 @@ FOR record | row IN select_querystatements END LOOP; - The record or row variable is successively assigned all the rows - resulting from the SELECT query and the loop body is executed - for each row. Here is an example: + The record or row variable is successively assigned all the rows + resulting from the SELECT query and the loop + body is executed for each row. Here is an example: @@ -1639,11 +1670,12 @@ END LOOP; name CURSOR ( arguments ) FOR select_query ; - (FOR may be replaced by IS for Oracle - compatibility.) arguments, if any, - are a comma-separated list of name - datatype pairs that define names to - be replaced by parameter values in the given query. The actual + (FOR may be replaced by IS for + Oracle compatibility.) + arguments, if any, are a + comma-separated list of name + datatype pairs that define names to be + replaced by parameter values in the given query. The actual values to substitute for these names will be specified later, when the cursor is opened. @@ -1685,13 +1717,14 @@ DECLARE OPEN unbound-cursor FOR SELECT ...; - The cursor variable is opened and given the specified query - to execute. The cursor cannot be open already, and it must - have been declared as an unbound cursor (that is, as a simple - refcursor variable). The SELECT query is treated - in the same way as other SELECT statements in PL/pgSQL: - PL/pgSQL variable names are substituted, - and the query plan is cached for possible re-use. + The cursor variable is opened and given the specified query to + execute. The cursor cannot be open already, and it must have been + declared as an unbound cursor (that is, as a simple + refcursor variable). The SELECT query + is treated in the same way as other SELECT + statements in PL/pgSQL: PL/pgSQL + variable names are substituted, and the query plan is cached for + possible re-use. OPEN curs1 FOR SELECT * FROM foo WHERE key = mykey; @@ -1799,8 +1832,8 @@ FETCH curs2 INTO foo,bar,baz; CLOSE cursor; - CLOSE closes the Portal underlying an open cursor. - This can be used to release resources earlier than end of + CLOSE closes the Portal underlying an open + cursor. This can be used to release resources earlier than end of transaction, or to free up the cursor variable to be opened again. @@ -1815,11 +1848,12 @@ CLOSE curs1; PL/pgSQL functions can return cursors to the - caller. This is used to return multiple rows or columns from the - function. The function opens the cursor and returns the cursor - name to the caller. The caller can then FETCH rows from the - cursor. The cursor can be closed by the caller, or it will be - closed automatically when the transaction closes. + caller. This is used to return multiple rows or columns from + the function. The function opens the cursor and returns the + cursor name to the caller. The caller can then + FETCH rows from the cursor. The cursor can + be closed by the caller, or it will be closed automatically + when the transaction closes. @@ -1879,7 +1913,8 @@ COMMIT; Errors and Messages - Use the RAISE statement to report messages and raise errors. + Use the RAISE statement to report messages and + raise errors. RAISE level 'format' , variable ...; @@ -1896,8 +1931,7 @@ RAISE level ' Oracle @@ -2300,7 +2334,7 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' - This section explains differences between Oracle's PL/SQL and + This section explains differences between Oracle's PL/SQL and PostgreSQL's PL/pgSQL languages in the hopes of helping developers port applications from Oracle to PostgreSQL. Most of the code here is from the ArsDigita @@ -2322,7 +2356,8 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' Main Differences - Some things you should keep in mind when porting from Oracle to PostgreSQL: + Some things you should keep in mind when porting from + Oracle to PostgreSQL: @@ -2479,7 +2514,7 @@ a_output := a_output || '' if v_'' || - Here is an Oracle function: + Here is an Oracle function: CREATE OR REPLACE FUNCTION cs_fmt_browser_version(v_name IN varchar, v_version IN varchar) RETURN varchar IS @@ -2508,12 +2543,13 @@ SHOW ERRORS; - Oracle can have IN, OUT, - and INOUT parameters passed to functions. - The INOUT, for example, means that the - parameter will receive a value and return another. PostgreSQL - only has IN parameters and functions can return - only a single value. + Oracle can have + IN, OUT, and + INOUT parameters passed to functions. The + INOUT, for example, means that the + parameter will receive a value and return + another. PostgreSQL only has IN + parameters and functions can return only a single value. @@ -2644,11 +2680,11 @@ END; - A Procedure with a lot of String Manipulation and OUT Parameters + A Procedure with a lot of String Manipulation and <literal>OUT</> Parameters - The following Oracle PL/SQL procedure is used to parse a URL and + The following Oracle PL/SQL procedure is used to parse a URL and return several elements (host, path and query). It is an procedure because in PL/pgSQL functions only one value can be returned (see ). In @@ -2738,7 +2774,7 @@ END; so you can work around it using a combination of other functions. I got tired of doing this and created my own instr functions that behave exactly like - Oracle's (it makes life easier). See the Oracle's (it makes life easier). See the for the code. @@ -2750,9 +2786,10 @@ END; - Oracle procedures give a little more flexibility to the developer - because nothing needs to be explicitly returned, but it can be - through the use of INOUT or OUT parameters. + Oracle procedures give a little more + flexibility to the developer because nothing needs to be + explicitly returned, but it can be through the use of + INOUT or OUT parameters. @@ -2890,12 +2927,13 @@ END; - Packages are a way Oracle gives you to encapsulate PL/SQL - statements and functions into one entity, like Java classes, where - you define methods and objects. You can access these - objects/methods with a . - (dot). Here is an example of an Oracle package from ACS 4 (the - ArsDigita Community + Packages are a way Oracle gives you to + encapsulate PL/SQL statements and functions into one entity, like + Java classes, where you define methods and objects. You can access + these objects/methods with a . + (dot). Here is an example of an Oracle + package from ACS 4 (the ArsDigita Community System): @@ -2924,10 +2962,11 @@ show errors - We port this to PostgreSQL by creating the different objects of - the Oracle package as functions with a standard naming - convention. We have to pay attention to some other details, like - the lack of default parameters in PostgreSQL functions. The above + We port this to PostgreSQL by creating the + different objects of the Oracle package + as functions with a standard naming convention. We have to pay + attention to some other details, like the lack of default + parameters in PostgreSQL functions. The above package would become something like this: diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml index 76a4ac014af..2282b07a740 100644 --- a/doc/src/sgml/ref/alter_database.sgml +++ b/doc/src/sgml/ref/alter_database.sgml @@ -1,5 +1,5 @@ @@ -71,8 +71,8 @@ ALTER DATABASE name RESET See and the - Administrator's Guide for more - information about allowed variable names and values. + &cite-admin; for more information about allowed variable names + and values. diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index a8cbfb5bc68..2287a72cb65 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1,5 +1,5 @@ @@ -399,9 +399,8 @@ VACUUM FULL table; Refer to CREATE TABLE for a further description - of valid arguments. - The PostgreSQL User's Guide has further - information on inheritance. + of valid arguments. The &cite-user; has further information on + inheritance. diff --git a/doc/src/sgml/ref/alter_user.sgml b/doc/src/sgml/ref/alter_user.sgml index 345379cd3a9..e6c5ac54d7a 100644 --- a/doc/src/sgml/ref/alter_user.sgml +++ b/doc/src/sgml/ref/alter_user.sgml @@ -1,5 +1,5 @@ @@ -145,8 +145,8 @@ ALTER USER username RESET See and the - Administrator's Guide for more - information about allowed variable names and values. + &cite-admin; for more information about allowed variable names + and values. diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index 72dc5cdcdeb..03b026e5215 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -1,5 +1,5 @@ @@ -152,8 +152,7 @@ ANALYZE [ VERBOSE ] [ table [ (ANALYZE deems them uninteresting (for example, in a unique-key column, there are no common values) or if the column data type does not support the appropriate operators. There is more - information about the statistics in the User's - Guide. + information about the statistics in the &cite-user;. diff --git a/doc/src/sgml/ref/begin.sgml b/doc/src/sgml/ref/begin.sgml index 6a02672e7d0..d8d28389e85 100644 --- a/doc/src/sgml/ref/begin.sgml +++ b/doc/src/sgml/ref/begin.sgml @@ -1,5 +1,5 @@ @@ -121,8 +121,7 @@ WARNING: BEGIN: already a transaction in progress SET TRANSACTION ISOLATION LEVEL SERIALIZABLE just after BEGIN if you need more rigorous transaction isolation. (Alternatively, you can change the default transaction - isolation level; see the PostgreSQL Administrator's - Guide for details.) + isolation level; see the &cite-admin; for details.) In SERIALIZABLE mode queries will see only changes committed before the entire transaction began (actually, before execution of the first DML statement @@ -161,7 +160,7 @@ WARNING: BEGIN: already a transaction in progress - If you turn autocommit mode off, then BEGIN + If you turn autocommit mode off, then BEGIN is not required: any SQL command automatically starts a transaction. diff --git a/doc/src/sgml/ref/checkpoint.sgml b/doc/src/sgml/ref/checkpoint.sgml index 2ac485f4c4b..9023b899982 100644 --- a/doc/src/sgml/ref/checkpoint.sgml +++ b/doc/src/sgml/ref/checkpoint.sgml @@ -1,4 +1,4 @@ - + @@ -34,8 +34,7 @@ CHECKPOINT A checkpoint is a point in the transaction log sequence at which all data files have been updated to reflect the information in the log. All data files will be flushed to disk. Refer to the - PostgreSQL Administrator's Guide for more - information about the WAL system. + &cite-admin; for more information about the WAL system. @@ -48,7 +47,7 @@ CHECKPOINT See Also - PostgreSQL Administrator's Guide + &cite-admin; @@ -61,3 +60,20 @@ CHECKPOINT + + diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml index 9024152fb3f..c5ae96850c2 100644 --- a/doc/src/sgml/ref/create_aggregate.sgml +++ b/doc/src/sgml/ref/create_aggregate.sgml @@ -1,5 +1,5 @@ @@ -271,9 +271,8 @@ CREATE AGGREGATE Usage - Refer to the chapter on aggregate functions - in the PostgreSQL Programmer's Guide for - complete examples of usage. + Refer to the chapter on aggregate functions in the + &cite-programmer; for complete examples of usage. diff --git a/doc/src/sgml/ref/create_cast.sgml b/doc/src/sgml/ref/create_cast.sgml index 98ed9c3a882..74c45328289 100644 --- a/doc/src/sgml/ref/create_cast.sgml +++ b/doc/src/sgml/ref/create_cast.sgml @@ -1,4 +1,4 @@ - + @@ -241,7 +241,7 @@ CREATE CAST (text AS int4) WITH FUNCTION int4(text); , , , - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_conversion.sgml b/doc/src/sgml/ref/create_conversion.sgml index bf8ec00ff7b..1ced20a3d14 100644 --- a/doc/src/sgml/ref/create_conversion.sgml +++ b/doc/src/sgml/ref/create_conversion.sgml @@ -1,4 +1,4 @@ - + @@ -158,7 +158,7 @@ CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc; , , - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index f419a12966f..c893a47e7d6 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -1,5 +1,5 @@ @@ -281,7 +281,7 @@ comment from Olly; response from Thomas... by specifying its name as the template, this is not (yet) intended as a general-purpose COPY DATABASE facility. We recommend that databases used as templates be treated as read-only. - See the Administrator's Guide for more information. + See the &cite-admin; for more information. diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml index 0d44434b3e5..01d5870a8b9 100644 --- a/doc/src/sgml/ref/create_domain.sgml +++ b/doc/src/sgml/ref/create_domain.sgml @@ -1,5 +1,5 @@ @@ -58,7 +58,7 @@ where constraint is: The underlying data type of the domain. This may include array specifiers. - Refer to the User's Guide for further + Refer to the &cite-user; for further information about data types and arrays. @@ -224,7 +224,7 @@ CREATE TABLE countrylist (id INT4, country country_code); - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index 6c737f26141..71c09e6ef5b 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -1,5 +1,5 @@ @@ -281,8 +281,7 @@ CREATE [ OR REPLACE ] FUNCTION name Notes - Refer to the chapter in the - PostgreSQL Programmer's Guide + Refer to the chapter in the &cite-programmer; on the topic of extending PostgreSQL via functions for further information on writing external functions. @@ -470,7 +469,7 @@ Point * complex_to_point (Complex *z) , , , - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_group.sgml b/doc/src/sgml/ref/create_group.sgml index 7992756cb48..539e2c60540 100644 --- a/doc/src/sgml/ref/create_group.sgml +++ b/doc/src/sgml/ref/create_group.sgml @@ -1,5 +1,5 @@ @@ -107,10 +107,10 @@ where option can be: Description - CREATE GROUP will create a new group in the database installation. - Refer to the Administrator's Guide for information about using groups - for authentication. - You must be a database superuser to use this command. + CREATE GROUP will create a new group in the + database installation. Refer to the &cite-admin; for information + about using groups for authentication. You must be a database + superuser to use this command. Use diff --git a/doc/src/sgml/ref/create_language.sgml b/doc/src/sgml/ref/create_language.sgml index ddf27fd4d7e..ffb615ae5d4 100644 --- a/doc/src/sgml/ref/create_language.sgml +++ b/doc/src/sgml/ref/create_language.sgml @@ -1,5 +1,5 @@ @@ -37,9 +37,8 @@ CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE langna CREATE LANGUAGE effectively associates the language name with a call handler that is responsible for executing - functions written in the language. Refer to the - Programmer's Guide for more information - about language call handlers. + functions written in the language. Refer to the &cite-programmer; + for more information about language call handlers. @@ -301,7 +300,7 @@ CREATE LANGUAGE plsample - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_opclass.sgml b/doc/src/sgml/ref/create_opclass.sgml index 48f21435da5..04d2c2d2f91 100644 --- a/doc/src/sgml/ref/create_opclass.sgml +++ b/doc/src/sgml/ref/create_opclass.sgml @@ -1,5 +1,5 @@ @@ -224,8 +224,7 @@ CREATE OPERATOR CLASS Refer to the chapter on interfacing extensions to indexes in the - PostgreSQL Programmer's Guide - for further information. + &cite-programmer; for further information. diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml index da547718281..69c8a420337 100644 --- a/doc/src/sgml/ref/create_operator.sgml +++ b/doc/src/sgml/ref/create_operator.sgml @@ -1,5 +1,5 @@ @@ -436,8 +436,7 @@ MYBOXES.description === box '((0,0), (1,1))' Notes - Refer to the chapter on operators in the - PostgreSQL User's Guide + Refer to the chapter on operators in the &cite-user; for further information. Refer to DROP OPERATOR to delete user-defined operators from a database. diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml index 4e36dfbe771..a357e434e37 100644 --- a/doc/src/sgml/ref/create_sequence.sgml +++ b/doc/src/sgml/ref/create_sequence.sgml @@ -1,5 +1,5 @@ @@ -256,7 +256,7 @@ ERROR: DefineSequence: MINVALUE (mincurrval and setval to operate on the sequence. These functions are documented in - the User's Guide. + the &cite-user;. diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index db51a26469f..3439c731150 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1,5 +1,5 @@ @@ -147,8 +147,8 @@ and table_constraint is: The data type of the column. This may include array specifiers. - Refer to the User's Guide for further - information about data types and arrays. + Refer to the &cite-user; for further information about data + types and arrays. diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml index 2917050b789..0c69b90da8e 100644 --- a/doc/src/sgml/ref/create_trigger.sgml +++ b/doc/src/sgml/ref/create_trigger.sgml @@ -1,5 +1,5 @@ @@ -202,9 +202,8 @@ CREATE TRIGGER - Refer to the chapters on SPI and Triggers in the - PostgreSQL Programmer's Guide for more - information. + Refer to the chapters on SPI and Triggers in the &cite-programmer; + for more information. @@ -349,7 +348,7 @@ CREATE TABLE distributors ( - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml index da22aa8696c..651409b2455 100644 --- a/doc/src/sgml/ref/create_type.sgml +++ b/doc/src/sgml/ref/create_type.sgml @@ -1,5 +1,5 @@ @@ -468,7 +468,7 @@ CREATE FUNCTION getfoo() RETURNS SETOF compfoo AS 'SELECT fooid, fooname FROM fo - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/create_user.sgml b/doc/src/sgml/ref/create_user.sgml index 04a596ef745..856abbf830d 100644 --- a/doc/src/sgml/ref/create_user.sgml +++ b/doc/src/sgml/ref/create_user.sgml @@ -1,5 +1,5 @@ @@ -34,10 +34,9 @@ where option can be: CREATE USER will add a new user to an instance - of PostgreSQL. Refer to the - Administrator's Guide for information about - managing users and authentication. You must be a database - superuser to use this command. + of PostgreSQL. Refer to the &cite-admin; + for information about managing users and authentication. You must + be a database superuser to use this command. @@ -102,12 +101,11 @@ where option can be: - See the chapter on client authentication in the - Administrator's Guide for details on - how to set up authentication mechanisms. Note that older - clients may lack support for the MD5 authentication mechanism - that is needed to work with passwords that are stored - encrypted. + See the chapter on client authentication in the &cite-admin; + for details on how to set up authentication mechanisms. Note + that older clients may lack support for the MD5 authentication + mechanism that is needed to work with passwords that are + stored encrypted. diff --git a/doc/src/sgml/ref/drop_aggregate.sgml b/doc/src/sgml/ref/drop_aggregate.sgml index 9913e5d8ed3..fb95a3c605c 100644 --- a/doc/src/sgml/ref/drop_aggregate.sgml +++ b/doc/src/sgml/ref/drop_aggregate.sgml @@ -1,5 +1,5 @@ @@ -47,10 +47,7 @@ DROP AGGREGATE name ( The input data type of the aggregate function, or * if the function accepts any input type. - (Refer to the PostgreSQL User's Guide for - further information about data types.) - This should become a cross-reference rather than a - hard-coded chapter number + (Refer to the &cite-user; for further information about data types.) diff --git a/doc/src/sgml/ref/ecpg-ref.sgml b/doc/src/sgml/ref/ecpg-ref.sgml index 2a5f0f6ac6d..a38d731b944 100644 --- a/doc/src/sgml/ref/ecpg-ref.sgml +++ b/doc/src/sgml/ref/ecpg-ref.sgml @@ -1,5 +1,5 @@ @@ -49,7 +49,7 @@ PostgreSQL documentation This reference page does not describe the embedded SQL language. - See the &cite-programmer; for that. + See the &cite-programmer; for more information on that topic. @@ -196,8 +196,8 @@ cc -o prog1 prog1.o -L/usr/local/pgsql/lib -lecpg See Also - PostgreSQL Programmer's Guide for a more - detailed description of the embedded SQL interface + &cite-programmer; for a more detailed description of the embedded + SQL interface diff --git a/doc/src/sgml/ref/execute.sgml b/doc/src/sgml/ref/execute.sgml index 67035572e74..2302ef99a32 100644 --- a/doc/src/sgml/ref/execute.sgml +++ b/doc/src/sgml/ref/execute.sgml @@ -1,5 +1,5 @@ @@ -21,7 +21,7 @@ PostgreSQL documentation 2002-08-12 - EXECUTE plan_name [ (parameter [, ...] ) ] + EXECUTE plan_name [ (parameter [, ...] ) ] [ INTO [ TEMPORARY | TEMP ] table ] @@ -42,16 +42,28 @@ PostgreSQL documentation + parameter - The actual value of a parameter to the prepared query. - This must be an expression yielding a value of a type - compatible with - the data-type specified for this parameter position in the - PREPARE statement that created the prepared - query. + The actual value of a parameter to the prepared query. This + must be an expression yielding a value of a type compatible + with the data-type specified for this parameter position in + the PREPARE statement that created the + prepared query. + + + + + + table + + + The name of the table in which to store the results of + executing the query (if it is a SELECT). If + no table is specified, the results are returned to the client + (as normal). @@ -85,6 +97,13 @@ PostgreSQL documentation name of a prepared query must be unique within a database session. + + Like SELECT INTO, EXECUTE can + be used to store the results of executing the query in a table by + specifying an INTO clause. For more information on this behabior, + consult the reference for . + + For more information on the creation and usage of prepared queries, see . diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml index cd9e1fba35c..7e7f43f50ea 100644 --- a/doc/src/sgml/ref/explain.sgml +++ b/doc/src/sgml/ref/explain.sgml @@ -1,5 +1,5 @@ @@ -87,9 +87,10 @@ EXPLAIN [ ANALYZE ] [ VERBOSE ] query - Prior to PostgreSQL 7.3, the query plan - was emitted in the form of a NOTICE message. Now it appears as a - query result (formatted like a table with a single text column). + Prior to PostgreSQL 7.3, the query + plan was emitted in the form of a NOTICE + message. Now it appears as a query result (formatted like a + table with a single text column). @@ -127,12 +128,26 @@ EXPLAIN [ ANALYZE ] [ VERBOSE ] query + + + In order to allow the PostgreSQL query + planner to make reasonably informed decisions when optimizing + queries, the ANALYZE statement should be used + to record statistics about the distribution of data within the + table. If you have not done this (or the statistical distribution + of the data in the table has changed significantly since the last + time ANALYZE was run), the estimated costs and + the resulting query plan displayed by EXPLAIN + are unlikely to conform to the real properties of the query. + + + The ANALYZE option causes the query to be actually executed, not only planned. The total elapsed time expended within each plan node (in milliseconds) and total number of rows it actually returned are added to the display. This is useful for seeing whether the planner's estimates - are close to reality. + are close to the actual performance of the query. @@ -171,8 +186,7 @@ ROLLBACK; There is only sparse documentation on the optimizer's use of cost information in PostgreSQL. - Refer to the User's Guide and - Programmer's Guide for more information. + Refer to the &cite-user; and &cite-programmer; for more information. @@ -233,7 +247,12 @@ EXPLAIN SELECT sum(i) FROM foo WHERE i < 10; Note that the specific numbers shown, and even the selected query strategy, may vary between PostgreSQL - releases due to planner improvements. + releases due to planner improvements. In addition, the algorithm + used by ANALYZE to generate statistics is not + completely deterministic; therefore, it is possible (although not + likely) for cost estimations to change between runs of + ANALYZE, even if the actual distribution of data + in the table has not changed. diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index b6565d0f2f8..7d63df874d9 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -1,5 +1,5 @@ @@ -253,7 +253,7 @@ PostgreSQL documentation - PostgreSQL Administrator's Guide + &cite-admin; diff --git a/doc/src/sgml/ref/initlocation.sgml b/doc/src/sgml/ref/initlocation.sgml index b89acd88389..01c018a3b46 100644 --- a/doc/src/sgml/ref/initlocation.sgml +++ b/doc/src/sgml/ref/initlocation.sgml @@ -1,5 +1,5 @@ @@ -69,7 +69,7 @@ PostgreSQL documentation See Also - PostgreSQL Administrator's Guide + &cite-admin; diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index 054570c9ce7..eeac298fb69 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -1,5 +1,5 @@ @@ -216,8 +216,7 @@ INSERT INTO films SELECT * FROM tmp; - Insert into arrays (refer to the - PostgreSQL User's Guide for further + Insert into arrays (refer to the &cite-user; for further information about arrays): diff --git a/doc/src/sgml/ref/load.sgml b/doc/src/sgml/ref/load.sgml index 1c5d871d89a..895f071e167 100644 --- a/doc/src/sgml/ref/load.sgml +++ b/doc/src/sgml/ref/load.sgml @@ -1,5 +1,5 @@ @@ -37,8 +37,8 @@ LOAD 'filename' The file name is specified in the same way as for shared library names in ; in particular, one may rely on a search path and automatic addition of the system's standard - shared library file name extension. See the - Programmer's Guide for more detail. + shared library file name extension. See the &cite-programmer; for + more information on this topic. @@ -57,7 +57,7 @@ LOAD 'filename' , - PostgreSQL Programmer's Guide + &cite-programmer; diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml index e9adeb2c5e0..9b26e2f5275 100644 --- a/doc/src/sgml/ref/pg_config-ref.sgml +++ b/doc/src/sgml/ref/pg_config-ref.sgml @@ -1,4 +1,4 @@ - + @@ -160,7 +160,24 @@ See Also - PostgreSQL Programmer's Guide + &cite-programmer; + + diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml index 1c5c8425134..1ce8cfc9f20 100644 --- a/doc/src/sgml/ref/pg_ctl-ref.sgml +++ b/doc/src/sgml/ref/pg_ctl-ref.sgml @@ -1,5 +1,5 @@ @@ -368,7 +368,7 @@ Command line was: See Also - , PostgreSQL Administrator's Guide + , &cite-admin; diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index 66a2e00073b..072237589dd 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1,5 +1,5 @@ @@ -705,7 +705,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; - PostgreSQL Administrator's Guide + &cite-admin; diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index 9430ec580ae..be76f55a36c 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -1,4 +1,4 @@ - + @@ -697,7 +697,7 @@ CREATE DATABASE foo WITH TEMPLATE = template0; - PostgreSQL Administrator's Guide + &cite-admin; diff --git a/doc/src/sgml/ref/pgtclsh.sgml b/doc/src/sgml/ref/pgtclsh.sgml index 4b8546fbc10..21ac402ff39 100644 --- a/doc/src/sgml/ref/pgtclsh.sgml +++ b/doc/src/sgml/ref/pgtclsh.sgml @@ -1,5 +1,5 @@ @@ -55,7 +55,7 @@ PostgreSQL documentation - PostgreSQL Programmer's Guide (description of libpgtcl) + &cite-programmer; (description of libpgtcl) tclsh 1 diff --git a/doc/src/sgml/ref/pgtksh.sgml b/doc/src/sgml/ref/pgtksh.sgml index af8f483cb43..b0689259788 100644 --- a/doc/src/sgml/ref/pgtksh.sgml +++ b/doc/src/sgml/ref/pgtksh.sgml @@ -1,5 +1,5 @@ @@ -55,7 +55,7 @@ PostgreSQL documentation - PostgreSQL Programmer's Guide (description of libpgtcl) + &cite-programmer; (description of libpgtcl) tclsh 1 diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml index fa9f29462c4..7b282eb295a 100644 --- a/doc/src/sgml/ref/postgres-ref.sgml +++ b/doc/src/sgml/ref/postgres-ref.sgml @@ -1,5 +1,5 @@ @@ -123,11 +123,11 @@ PostgreSQL documentation You can avoid having to type these options by setting up a - configuration file. See the Administrator's - Guide for details. Some (safe) options can also be - set from the connecting client in an application-dependent way. - For example, if the environment variable PGOPTIONS - is set, then libpq-based clients will pass that string to the + configuration file. See the &cite-admin; for details. Some + (safe) options can also be set from the connecting client in an + application-dependent way. For example, if the environment + variable PGOPTIONS is set, then + libpq-based clients will pass that string to the server, which will interpret it as postgres command-line options. @@ -153,8 +153,7 @@ PostgreSQL documentation means that the day before month (rather than month before day) rule is used to interpret ambiguous date input, and that the day is printed before the month in certain - date output formats. See the PostgreSQL User's - Guide for more information. + date output formats. See the &cite-user; for more information. diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml index fa2eec8312a..e22c5b9d16b 100644 --- a/doc/src/sgml/ref/postmaster.sgml +++ b/doc/src/sgml/ref/postmaster.sgml @@ -1,5 +1,5 @@ @@ -80,9 +80,8 @@ PostgreSQL documentation postmaster accepts the following command line arguments. For a detailed discussion of the options - consult the Administrator's Guide. You can - also save typing most of these options by setting up a - configuration file. + consult the &cite-admin;. You can also save typing most of these + options by setting up a configuration file. @@ -111,11 +110,11 @@ PostgreSQL documentation -c name=value - Sets a named run-time parameter. Consult the - Administrator's Guide for a list and - descriptions. Most of the other command line options are in - fact short forms of such a parameter assignment. @@ -219,9 +218,9 @@ PostgreSQL documentation default, this value is 32, but it can be set as high as your system will support. (Note that is required to be at least twice - . See the Administrator's - Guide for a discussion of system resource requirements - for large numbers of client connections.) + . See the &cite-admin; for a discussion of + system resource requirements for large numbers of client + connections.) @@ -404,8 +403,8 @@ PostgreSQL documentation Other environment variables may be used to designate alternative - data storage locations. See the Administrator's - Guide for more information. + data storage locations. See the &cite-admin; for more + information. diff --git a/doc/src/sgml/ref/reset.sgml b/doc/src/sgml/ref/reset.sgml index ed36d549c52..97234134237 100644 --- a/doc/src/sgml/ref/reset.sgml +++ b/doc/src/sgml/ref/reset.sgml @@ -1,5 +1,5 @@ @@ -64,7 +64,7 @@ SET variable TO DEFAULT current session. The actual source of this value might be a compiled-in default, the postmaster's configuration file or command-line switches, or per-database or per-user default settings. See the - Administrator's Guide for details. + &cite-admin; for details. diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 9ace534bc31..0f8a3dbcc92 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ @@ -291,19 +291,17 @@ where from_item can be: - DISTINCT will eliminate duplicate rows from the - result. - ALL (the default) will return all candidate rows, - including duplicates. + DISTINCT will eliminate duplicate rows from the result. ALL (the + default) will return all candidate rows, including duplicates. - DISTINCT ON eliminates rows that match on all the + DISTINCT ON eliminates rows that match on all the specified expressions, keeping only the first row of each set of duplicates. The DISTINCT ON expressions are interpreted using the same rules as for ORDER BY items; see below. Note that the first row of each set is unpredictable - unless ORDER BY is used to ensure that the desired + unless ORDER BY is used to ensure that the desired row appears first. For example, SELECT DISTINCT ON (location) location, time, report @@ -336,9 +334,9 @@ where from_item can be: - SELECT queries can be combined using UNION, INTERSECT, and EXCEPT - operators. Use parentheses if necessary to determine the ordering - of these operators. + SELECT queries can be combined using UNION, + INTERSECT, and EXCEPT operators. Use parentheses if necessary to + determine the ordering of these operators. @@ -368,8 +366,8 @@ where from_item can be: - The FOR UPDATE clause causes the SELECT statement to lock the selected - rows against concurrent updates. + The FOR UPDATE clause causes the SELECT + statement to lock the selected rows against concurrent updates. @@ -387,11 +385,12 @@ where from_item can be: - The FROM clause specifies one or more source tables for the SELECT. - If multiple sources are specified, the result is conceptually the - Cartesian product of all the rows in all the sources --- but usually - qualification conditions are added to restrict the returned rows to - a small subset of the Cartesian product. + The FROM clause specifies one or more source tables for the + SELECT. If multiple sources are specified, the + result is conceptually the Cartesian product of all the rows in + all the sources --- but usually qualification conditions are added + to restrict the returned rows to a small subset of the Cartesian + product. @@ -407,10 +406,11 @@ where from_item can be: - A FROM item can also be a parenthesized sub-SELECT (note that an - alias clause is required for a sub-SELECT!). This is an extremely - handy feature since it's the only way to get multiple levels of - grouping, aggregation, or sorting in a single query. + A FROM item can also be a parenthesized + sub-SELECT (note that an alias clause is + required for a sub-SELECT!). This is an + extremely useful feature since it's the only way to get multiple + levels of grouping, aggregation, or sorting in a single query. @@ -542,23 +542,25 @@ GROUP BY expression [, ...] - GROUP BY will condense into a single row all selected rows that share the - same values for the grouped columns. Aggregate functions, if any, - are computed across all rows making up each group, producing a - separate value for each group (whereas without GROUP BY, an - aggregate produces a single value computed across all the selected - rows). When GROUP BY is present, it is not valid for the SELECT - output expression(s) to refer to + GROUP BY will condense into a single row all selected rows that + share the same values for the grouped columns. Aggregate + functions, if any, are computed across all rows making up each + group, producing a separate value for each group (whereas without + GROUP BY, an aggregate produces a single value computed across all + the selected rows). When GROUP BY is present, it is not valid for + the SELECT output expression(s) to refer to ungrouped columns except within aggregate functions, since there - would be more than one possible value to return for an ungrouped column. + would be more than one possible value to return for an ungrouped + column. - A GROUP BY item can be an input column name, or the name or ordinal - number of an output column (SELECT expression), or it can be an arbitrary - expression formed from input-column values. In case of ambiguity, a GROUP - BY name will - be interpreted as an input-column name rather than an output column name. + A GROUP BY item can be an input column name, or the name or + ordinal number of an output column (SELECT + expression), or it can be an arbitrary expression formed from + input-column values. In case of ambiguity, a GROUP BY name will + be interpreted as an input-column name rather than an output + column name. @@ -610,10 +612,11 @@ ORDER BY expression [ ASC | DESC | - An ORDER BY item can be the name or ordinal - number of an output column (SELECT expression), or it can be an arbitrary - expression formed from input-column values. In case of ambiguity, an - ORDER BY name will be interpreted as an output-column name. + An ORDER BY item can be the name or ordinal number of an output + column (SELECT expression), or it can be an + arbitrary expression formed from input-column values. In case of + ambiguity, an ORDER BY name will be interpreted as an + output-column name. The ordinal number refers to the ordinal (left-to-right) position @@ -697,10 +700,10 @@ SELECT name FROM distributors ORDER BY code; The UNION operator computes the collection (set union) of the rows - returned by the queries involved. - The two SELECT statements that represent the direct operands of the UNION must - produce the same number of columns, and corresponding columns must be - of compatible data types. + returned by the queries involved. The two + SELECT statements that represent the direct + operands of the UNION must produce the same number of columns, and + corresponding columns must be of compatible data types. @@ -710,8 +713,9 @@ SELECT name FROM distributors ORDER BY code; - Multiple UNION operators in the same SELECT statement are - evaluated left to right, unless otherwise indicated by parentheses. + Multiple UNION operators in the same SELECT + statement are evaluated left to right, unless otherwise indicated + by parentheses. @@ -864,22 +868,26 @@ SELECT name FROM distributors ORDER BY code; - FOR UPDATE causes the rows retrieved by the query to be locked as though - for update. This prevents them from being modified or deleted by other - transactions until the current transaction ends; that is, other - transactions that attempt UPDATE, DELETE, or SELECT FOR UPDATE of these - rows will be blocked until the current transaction ends. Also, if an - UPDATE, DELETE, or SELECT FOR UPDATE from another transaction has already - locked a selected row or rows, SELECT FOR UPDATE will wait for the other - transaction to complete, and will then lock and return the updated row - (or no row, if the row was deleted). For further discussion see the - concurrency chapter of the User's Guide. + FOR UPDATE causes the rows retrieved by the query to be locked as + though for update. This prevents them from being modified or + deleted by other transactions until the current transaction ends; + that is, other transactions that attempt + UPDATE, DELETE, or + SELECT FOR UPDATE of these rows will be blocked + until the current transaction ends. Also, if an + UPDATE, DELETE, or + SELECT FOR UPDATE from another transaction has + already locked a selected row or rows, SELECT FOR + UPDATE will wait for the other transaction to complete, + and will then lock and return the updated row (or no row, if the + row was deleted). For further discussion see the concurrency + chapter of the &cite-user;. - If specific tables are named in FOR UPDATE, then only rows coming from - those tables are locked; any other tables used in the SELECT are simply - read as usual. + If specific tables are named in FOR UPDATE, then only rows coming + from those tables are locked; any other tables used in the + SELECT are simply read as usual. @@ -1097,9 +1105,9 @@ SELECT 2+2; 4 -Some other SQL databases cannot do this except by introducing a dummy one-row -table to do the select from. A less obvious use is to abbreviate a -normal select from one or more tables: +Some other SQL databases cannot do this except by +introducing a dummy one-row table to do the select from. A less +obvious use is to abbreviate a normal select from one or more tables: SELECT distributors.* WHERE distributors.name = 'Westward'; diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml index f8f08f761ac..abf913614d4 100644 --- a/doc/src/sgml/ref/set.sgml +++ b/doc/src/sgml/ref/set.sgml @@ -1,5 +1,5 @@ @@ -80,11 +80,11 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone The SET command changes run-time configuration parameters. Many of the run-time parameters listed in the - Administrator's Guide can be changed on-the-fly - with SET. (But some require superuser privileges - to change, and others cannot be changed after server or session start.) - Note that SET only affects the value used by the - current session. + &cite-admin; can be changed on-the-fly with SET. + (But some require superuser privileges to change, and others cannot + be changed after server or session start.) Note that + SET only affects the value used by the current + session. @@ -109,10 +109,9 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone - Even with autocommit set to off, SET + Even with autocommit set to off, SET does not start a new transaction block. See the - autocommit section of the Administrator's - Guide for details. + autocommit section of the &cite-admin; for details. @@ -517,8 +516,8 @@ SELECT CURRENT_TIMESTAMP AS today; The function set_config provides the equivalent - capability. See Miscellaneous Functions in the - PostgreSQL User's Guide. + capability. See Miscellaneous Functions in + the &cite-user;. diff --git a/doc/src/sgml/ref/set_transaction.sgml b/doc/src/sgml/ref/set_transaction.sgml index 72e62ad3cb3..d88274d3ad5 100644 --- a/doc/src/sgml/ref/set_transaction.sgml +++ b/doc/src/sgml/ref/set_transaction.sgml @@ -1,4 +1,4 @@ - + 2000-11-24 @@ -109,9 +109,8 @@ SET SESSION CHARACTERISTICS AS TRANSACTION SET default_transaction_isolation = 'value' - and in the - configuration file. Consult the Administrator's - Guide for more information. + and in the configuration file. Consult the &cite-admin; for more + information. @@ -127,8 +126,7 @@ SET default_transaction_isolation = 'value' not provide the isolation levels and . Because of multiversion concurrency control, the level is not - truly serializable. See the User's Guide for - details. + truly serializable. See the &cite-user; for details. diff --git a/doc/src/sgml/ref/show.sgml b/doc/src/sgml/ref/show.sgml index 2f086ee8a2d..c97c2a04c53 100644 --- a/doc/src/sgml/ref/show.sgml +++ b/doc/src/sgml/ref/show.sgml @@ -1,5 +1,5 @@ @@ -62,10 +62,9 @@ SHOW ALL - Even with autocommit set to off, SHOW + Even with autocommit set to off, SHOW does not start a new transaction block. See the - autocommit section of the Administrator's - Guide for details. + autocommit section of the &cite-admin; for details. @@ -91,7 +90,7 @@ SHOW ALL Examples - Show the current DateStyle setting: + Show the current DateStyle setting: SHOW DateStyle; @@ -103,7 +102,8 @@ SHOW DateStyle; - Show the current genetic optimizer (geqo) setting: + Show whether the genetic query optimizer is enabled by displaying + the geqo setting: SHOW GEQO; geqo @@ -148,7 +148,7 @@ SHOW ALL; The function current_setting produces equivalent output. See Miscellaneous Functions in the - PostgreSQL User's Guide. + &cite-user;. diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index 5f7b76285fb..07dbbaed2a7 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -1,5 +1,5 @@ @@ -206,7 +206,7 @@ INFO: Index index: Pages 28; intended usage is in connection with preparation of user-defined template databases, or other databases that are completely read-only and will not receive routine maintenance VACUUM operations. - See the Administrator's Guide for details. + See the &cite-admin; for details. diff --git a/doc/src/sgml/xaggr.sgml b/doc/src/sgml/xaggr.sgml index 4496b45c5f6..8494eaa504d 100644 --- a/doc/src/sgml/xaggr.sgml +++ b/doc/src/sgml/xaggr.sgml @@ -1,5 +1,5 @@ @@ -114,8 +114,7 @@ CREATE AGGREGATE avg ( For further details see the description of the CREATE - AGGREGATE command in the Reference - Manual. + AGGREGATE command in the &cite-reference;. diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index ff301cc6674..62b7564f0fb 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -1,5 +1,5 @@ @@ -2051,8 +2051,8 @@ CREATE FUNCTION test(smallint, double precision) RETURNS ... it is not immediately clear which function would be called with some trivial input like test(1, 1.5). The currently implemented resolution rules are described in the - User's Guide, but it is unwise to design a - system that subtly relies on this behavior. + &cite-user;, but it is unwise to design a system that subtly + relies on this behavior.