Update this branch to match CVS head, includes WIN32 improvements.
authorBruce Momjian <[email protected]>
Sun, 7 Sep 2003 04:37:13 +0000 (04:37 +0000)
committerBruce Momjian <[email protected]>
Sun, 7 Sep 2003 04:37:13 +0000 (04:37 +0000)
383 files changed:
HISTORY
config/ac_func_accept_argtypes.m4
config/python.m4
configure
configure.in
contrib/contrib-global.mk
contrib/tsearch/parser.h
contrib/tsearch/parser.l
contrib/tsearch2/Makefile
contrib/tsearch2/docs/tsearch-V2-intro.html
contrib/tsearch2/expected/tsearch2.out
contrib/tsearch2/ispell/Makefile
contrib/tsearch2/query.c
contrib/tsearch2/query.h
contrib/tsearch2/rewrite.c
contrib/tsearch2/snowball/Makefile
contrib/tsearch2/sql/tsearch2.sql
contrib/tsearch2/wordparser/Makefile
contrib/tsearch2/wordparser/parser.h
contrib/tsearch2/wordparser/parser.l
doc/FAQ
doc/FAQ_german
doc/TODO
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ_german.html
doc/src/sgml/Makefile
doc/src/sgml/advanced.sgml
doc/src/sgml/array.sgml
doc/src/sgml/backup.sgml
doc/src/sgml/charset.sgml
doc/src/sgml/client-auth.sgml
doc/src/sgml/datatype.sgml
doc/src/sgml/datetime.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/dfunc.sgml
doc/src/sgml/dml.sgml
doc/src/sgml/ecpg.sgml
doc/src/sgml/extend.sgml
doc/src/sgml/filelist.sgml
doc/src/sgml/func.sgml
doc/src/sgml/indices.sgml
doc/src/sgml/installation.sgml
doc/src/sgml/jdbc.sgml
doc/src/sgml/keywords.sgml
doc/src/sgml/libpgtcl.sgml
doc/src/sgml/libpq.sgml
doc/src/sgml/lobj.sgml
doc/src/sgml/maintenance.sgml
doc/src/sgml/manage-ag.sgml
doc/src/sgml/monitoring.sgml
doc/src/sgml/mvcc.sgml
doc/src/sgml/perform.sgml
doc/src/sgml/plperl.sgml
doc/src/sgml/plpgsql.sgml
doc/src/sgml/plpython.sgml
doc/src/sgml/pltcl.sgml
doc/src/sgml/postgres.sgml
doc/src/sgml/protocol.sgml
doc/src/sgml/queries.sgml
doc/src/sgml/query.sgml
doc/src/sgml/ref/abort.sgml
doc/src/sgml/ref/alter_aggregate.sgml
doc/src/sgml/ref/alter_conversion.sgml
doc/src/sgml/ref/alter_database.sgml
doc/src/sgml/ref/alter_domain.sgml
doc/src/sgml/ref/alter_function.sgml
doc/src/sgml/ref/alter_group.sgml
doc/src/sgml/ref/alter_language.sgml
doc/src/sgml/ref/alter_opclass.sgml
doc/src/sgml/ref/alter_schema.sgml
doc/src/sgml/ref/alter_sequence.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/alter_trigger.sgml
doc/src/sgml/ref/alter_user.sgml
doc/src/sgml/ref/analyze.sgml
doc/src/sgml/ref/begin.sgml
doc/src/sgml/ref/checkpoint.sgml
doc/src/sgml/ref/close.sgml
doc/src/sgml/ref/cluster.sgml
doc/src/sgml/ref/clusterdb.sgml
doc/src/sgml/ref/comment.sgml
doc/src/sgml/ref/commit.sgml
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/create_aggregate.sgml
doc/src/sgml/ref/create_cast.sgml
doc/src/sgml/ref/create_constraint.sgml
doc/src/sgml/ref/create_conversion.sgml
doc/src/sgml/ref/create_database.sgml
doc/src/sgml/ref/create_domain.sgml
doc/src/sgml/ref/create_function.sgml
doc/src/sgml/ref/create_group.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_language.sgml
doc/src/sgml/ref/create_opclass.sgml
doc/src/sgml/ref/create_operator.sgml
doc/src/sgml/ref/create_rule.sgml
doc/src/sgml/ref/create_schema.sgml
doc/src/sgml/ref/create_sequence.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table_as.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/create_type.sgml
doc/src/sgml/ref/create_user.sgml
doc/src/sgml/ref/create_view.sgml
doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createlang.sgml
doc/src/sgml/ref/createuser.sgml
doc/src/sgml/ref/deallocate.sgml
doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/delete.sgml
doc/src/sgml/ref/drop_aggregate.sgml
doc/src/sgml/ref/drop_cast.sgml
doc/src/sgml/ref/drop_conversion.sgml
doc/src/sgml/ref/drop_database.sgml
doc/src/sgml/ref/drop_domain.sgml
doc/src/sgml/ref/drop_function.sgml
doc/src/sgml/ref/drop_group.sgml
doc/src/sgml/ref/drop_index.sgml
doc/src/sgml/ref/drop_language.sgml
doc/src/sgml/ref/drop_opclass.sgml
doc/src/sgml/ref/drop_operator.sgml
doc/src/sgml/ref/drop_rule.sgml
doc/src/sgml/ref/drop_schema.sgml
doc/src/sgml/ref/drop_sequence.sgml
doc/src/sgml/ref/drop_table.sgml
doc/src/sgml/ref/drop_trigger.sgml
doc/src/sgml/ref/drop_type.sgml
doc/src/sgml/ref/drop_user.sgml
doc/src/sgml/ref/drop_view.sgml
doc/src/sgml/ref/dropdb.sgml
doc/src/sgml/ref/droplang.sgml
doc/src/sgml/ref/dropuser.sgml
doc/src/sgml/ref/ecpg-ref.sgml
doc/src/sgml/ref/end.sgml
doc/src/sgml/ref/execute.sgml
doc/src/sgml/ref/explain.sgml
doc/src/sgml/ref/fetch.sgml
doc/src/sgml/ref/grant.sgml
doc/src/sgml/ref/initdb.sgml
doc/src/sgml/ref/initlocation.sgml
doc/src/sgml/ref/insert.sgml
doc/src/sgml/ref/ipcclean.sgml
doc/src/sgml/ref/listen.sgml
doc/src/sgml/ref/load.sgml
doc/src/sgml/ref/lock.sgml
doc/src/sgml/ref/move.sgml
doc/src/sgml/ref/notify.sgml
doc/src/sgml/ref/pg_config-ref.sgml
doc/src/sgml/ref/pg_controldata.sgml
doc/src/sgml/ref/pg_ctl-ref.sgml
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_restore.sgml
doc/src/sgml/ref/pgtclsh.sgml
doc/src/sgml/ref/pgtksh.sgml
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/ref/postmaster.sgml
doc/src/sgml/ref/prepare.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/reindex.sgml
doc/src/sgml/ref/reset.sgml
doc/src/sgml/ref/revoke.sgml
doc/src/sgml/ref/rollback.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/select_into.sgml
doc/src/sgml/ref/set.sgml
doc/src/sgml/ref/set_constraints.sgml
doc/src/sgml/ref/set_session_auth.sgml
doc/src/sgml/ref/set_transaction.sgml
doc/src/sgml/ref/show.sgml
doc/src/sgml/ref/start_transaction.sgml
doc/src/sgml/ref/truncate.sgml
doc/src/sgml/ref/unlisten.sgml
doc/src/sgml/ref/update.sgml
doc/src/sgml/ref/vacuum.sgml
doc/src/sgml/ref/vacuumdb.sgml
doc/src/sgml/regress.sgml
doc/src/sgml/release.sgml
doc/src/sgml/rules.sgml
doc/src/sgml/runtime.sgml
doc/src/sgml/spi.sgml
doc/src/sgml/syntax.sgml
doc/src/sgml/trigger.sgml
doc/src/sgml/typeconv.sgml
doc/src/sgml/user-manag.sgml
doc/src/sgml/wal.sgml
doc/src/sgml/xaggr.sgml
doc/src/sgml/xfunc.sgml
doc/src/sgml/xindex.sgml
doc/src/sgml/xoper.sgml
doc/src/sgml/xplang.sgml
doc/src/sgml/xtypes.sgml
src/Makefile.global.in
src/backend/access/hash/hash.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashsearch.c
src/backend/access/hash/hashutil.c
src/backend/access/nbtree/nbtinsert.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/commands/analyze.c
src/backend/commands/copy.c
src/backend/commands/indexcmds.c
src/backend/commands/opclasscmds.c
src/backend/commands/portalcmds.c
src/backend/commands/tablecmds.c
src/backend/executor/execGrouping.c
src/backend/executor/execQual.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeSubplan.c
src/backend/libpq/hba.c
src/backend/libpq/ip.c
src/backend/libpq/pg_hba.conf.sample
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/util/clauses.c
src/backend/parser/gram.y
src/backend/parser/parse_clause.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_oper.c
src/backend/po/ru.po
src/backend/port/ipc_test.c
src/backend/postmaster/postmaster.c
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lock.c
src/backend/tcop/postgres.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/array_userfuncs.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/timestamp.c
src/backend/utils/cache/Makefile
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/typcache.c [new file with mode: 0644]
src/backend/utils/error/elog.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/hash/dynahash.c
src/backend/utils/hash/hashfn.c
src/backend/utils/init/globals.c
src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
src/backend/utils/mb/Unicode/gb18030_to_utf8.map
src/backend/utils/mb/conversion_procs/Makefile
src/backend/utils/mb/conversion_procs/proc.mk
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/mmgr/portalmem.c
src/backend/utils/sort/tuplesort.c
src/bin/initdb/Makefile
src/bin/initdb/initdb.sh
src/bin/pg_controldata/po/ru.po
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_restore.c
src/bin/pg_id/pg_id.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/bin/pg_resetxlog/po/ru.po
src/bin/psql/common.c
src/bin/psql/common.h
src/bin/psql/describe.c
src/bin/psql/input.c
src/bin/psql/mbprint.c
src/bin/psql/nls.mk
src/bin/psql/po/de.po
src/bin/psql/po/fr.po
src/bin/psql/po/ru.po
src/bin/psql/po/sv.po
src/bin/psql/prompt.c
src/bin/scripts/Makefile
src/bin/scripts/common.c
src/bin/scripts/po/ru.po
src/include/access/hash.h
src/include/catalog/catversion.h
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_proc.h
src/include/executor/executor.h
src/include/libpq/ip.h
src/include/miscadmin.h
src/include/nodes/execnodes.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/nodes/pg_list.h
src/include/nodes/primnodes.h
src/include/parser/parse_clause.h
src/include/parser/parse_oper.h
src/include/pg_config.h.in
src/include/port.h
src/include/postgres_ext.h
src/include/storage/lmgr.h
src/include/utils/acl.h
src/include/utils/builtins.h
src/include/utils/cash.h
src/include/utils/datetime.h
src/include/utils/errcodes.h
src/include/utils/guc.h
src/include/utils/hsearch.h
src/include/utils/lsyscache.h
src/include/utils/typcache.h [new file with mode: 0644]
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ecpglib/connect.c
src/interfaces/ecpg/ecpglib/error.c
src/interfaces/ecpg/include/sqltypes.h
src/interfaces/ecpg/pgtypeslib/timestamp.c
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/test/test1.pgc
src/interfaces/ecpg/test/test_thread.pgc
src/interfaces/jdbc/build.xml
src/interfaces/jdbc/org/postgresql/core/BaseStatement.java
src/interfaces/jdbc/org/postgresql/errors.properties
src/interfaces/jdbc/org/postgresql/errors_de.properties
src/interfaces/jdbc/org/postgresql/errors_it.properties
src/interfaces/jdbc/org/postgresql/errors_nl.properties
src/interfaces/jdbc/org/postgresql/errors_zh_TW.properties
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/BlobTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/ResultSetTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java
src/interfaces/libpq/Makefile
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/libpq-int.h
src/interfaces/libpq/po/es.po
src/interfaces/libpq/po/fr.po
src/interfaces/libpq/po/ru.po
src/interfaces/libpq/po/sv.po
src/interfaces/libpq/win32.c
src/interfaces/libpq/win32.mak
src/pl/plperl/plperl.c
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/plpgsql.h
src/pl/tcl/pltcl.c
src/port/thread.c
src/template/bsdi
src/template/freebsd
src/template/linux
src/template/netbsd
src/template/osf
src/template/unixware
src/test/regress/expected/abstime-solaris-1947.out
src/test/regress/expected/abstime.out
src/test/regress/expected/arrays.out
src/test/regress/expected/circle.out
src/test/regress/expected/date.out
src/test/regress/expected/geometry.out
src/test/regress/expected/geometry_1.out
src/test/regress/expected/horology-no-DST-before-1970.out
src/test/regress/expected/horology-solaris-1947.out
src/test/regress/expected/horology.out
src/test/regress/expected/polymorphism.out
src/test/regress/expected/portals.out
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamptz.out
src/test/regress/expected/update.out [new file with mode: 0644]
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/arrays.sql
src/test/regress/sql/circle.sql
src/test/regress/sql/geometry.sql
src/test/regress/sql/update.sql [new file with mode: 0644]
src/tools/pgindent/pgindent

diff --git a/HISTORY b/HISTORY
index b12404d18e9789dff5ba78759d0d4cc3d2da5cf0..29c12069af5b3f49ed317d21616bc5b2c59a31bf 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -212,6 +212,7 @@ Add new DateStyle values MDY, DMY, and YMD, honor US and European for
   prepared statements) (Tom)
 Assume NaN value to be larger than any other value in MIN()/MAX() (Tom)
 Prevent interval from supressing ':00' seconds display
+New pg_get_triggerdef(prettyprint) and pg_constraint_is_visible() functions
 
      _________________________________________________________________
 
@@ -259,6 +260,10 @@ Allow pqInternalNotice() to accept a format string and args instead of
   just a preformatted message (Tom, Sean Chittenden)
 Allow control SSL negotiation with sslmode values "disable", "allow", 
   "Prefer", and "require" (Jon Jensen)
+Allow new error codes and levels of text (Tom)
+Allow access to the underlying table and column of a query result (Tom)
+Allow access to the current transaction status (Tom)
+Add ability to pass binary data directly to the backend (Tom)
 
      _________________________________________________________________
 
index f22d90565991bd8646ee7242955597d2618a8fdd..abe5b1e77ecae80ff3be6330e3cae98947402f01 100644 (file)
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.4 2002/03/29 17:32:53 petere Exp $
+# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.4.4.1 2003/09/07 04:36:39 momjian Exp $
 # This comes from the official Autoconf macro archive at
 # <http://research.cys.de/autoconf-archive/>
 # (I removed the $ before the Id CVS keyword below.)
@@ -7,9 +7,10 @@
 dnl @synopsis AC_FUNC_ACCEPT_ARGTYPES
 dnl
 dnl Checks the data types of the three arguments to accept(). Results are
-dnl placed into the symbols ACCEPT_TYPE_ARG[123], consistent with the
-dnl following example:
+dnl placed into the symbols ACCEPT_TYPE_RETURN and ACCEPT_TYPE_ARG[123], 
+dnl consistent with the following example:
 dnl
+dnl       #define ACCEPT_TYPE_RETURN int
 dnl       #define ACCEPT_TYPE_ARG1 int
 dnl       #define ACCEPT_TYPE_ARG2 struct sockaddr *
 dnl       #define ACCEPT_TYPE_ARG3 socklen_t
@@ -36,24 +37,29 @@ dnl
 # Solaris 7 and 8 have arg3 as 'void *' (disguised as 'Psocklen_t'
 # which is *not* 'socklen_t *').  If we detect that, then we assume
 # 'int' as the result, because that ought to work best.
+#
+# On Win32, accept() returns 'unsigned int PASCAL' 
 
 AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
 [AC_MSG_CHECKING([types of arguments for accept()])
- AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
- [AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
-  [AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
-   [for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
-     for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
-      for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
-       AC_TRY_COMPILE(
+ AC_CACHE_VAL(ac_cv_func_accept_return,dnl
+ [AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
+  [AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
+   [AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
+    [for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
+      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
+       for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
+        for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
+         AC_TRY_COMPILE(
 [#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
-        [], [ac_not_found=no; break 3], [ac_not_found=yes])
+extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
+         [], [ac_not_found=no; break 4], [ac_not_found=yes])
+       done
       done
      done
     done
@@ -63,10 +69,13 @@ extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func
     if test "$ac_cv_func_accept_arg3" = "void"; then
       ac_cv_func_accept_arg3=int
     fi
+    ])dnl AC_CACHE_VAL
    ])dnl AC_CACHE_VAL
   ])dnl AC_CACHE_VAL
  ])dnl AC_CACHE_VAL
- AC_MSG_RESULT([$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *])
+ AC_MSG_RESULT([$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *])
+ AC_DEFINE_UNQUOTED(ACCEPT_TYPE_RETURN, $ac_cv_func_accept_return,
+                    [Define to the return type of 'accept'])
  AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1, $ac_cv_func_accept_arg1,
                     [Define to the type of arg 1 of 'accept'])
  AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2, $ac_cv_func_accept_arg2,
index ce126419b77430c4544cab2e0da75e9d65adfd5b..d8bf77d2998cf5af4f9af5e25522e9e0272a3890 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Autoconf macros for configuring the build of Python extension modules
 #
-# $Header: /cvsroot/pgsql/config/python.m4,v 1.5 2002/09/04 22:54:18 petere Exp $
+# $Header: /cvsroot/pgsql/config/python.m4,v 1.5.4.1 2003/09/07 04:36:39 momjian Exp $
 #
 
 # PGAC_PATH_PYTHON
@@ -26,19 +26,14 @@ python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"`
 python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
 python_configdir="${python_execprefix}/lib/python${python_version}/config"
-python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"
-python_moduleexecdir="${python_execprefix}/lib/python${python_version}/site-packages"
 python_includespec="-I${python_prefix}/include/python${python_version}"
 if test "$python_prefix" != "$python_execprefix"; then
   python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
 fi
 
-AC_SUBST(python_version)[]dnl
 AC_SUBST(python_prefix)[]dnl
 AC_SUBST(python_execprefix)[]dnl
 AC_SUBST(python_configdir)[]dnl
-AC_SUBST(python_moduledir)[]dnl
-AC_SUBST(python_moduleexecdir)[]dnl
 AC_SUBST(python_includespec)[]dnl
 # This should be enough of a message.
 if test "$python_prefix" != "$python_execprefix"; then
@@ -49,19 +44,6 @@ fi
 ])# _PGAC_CHECK_PYTHON_DIRS
 
 
-# PGAC_CHECK_PYTHON_MODULE_SETUP
-# ------------------------------
-# Finds things required to build a Python extension module.
-# This used to do more, that's why it's separate.
-#
-# It would be nice if we could check whether the current setup allows
-# the build of the shared module. Future project.
-AC_DEFUN([PGAC_CHECK_PYTHON_MODULE_SETUP],
-[
-  AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS])
-])# PGAC_CHECK_PYTHON_MODULE_SETUP
-
-
 # PGAC_CHECK_PYTHON_EMBED_SETUP
 # -----------------------------
 # Courtesy of the INN 2.3.1 package...
index 2ba5879468ff6cb2ccd241a92c84a1fe1b25e5c9..be06d57d51d06917a00629380b5cb516217516f7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.53 for PostgreSQL 7.4beta1.
+# Generated by GNU Autoconf 2.53 for PostgreSQL 7.4beta2.
 #
 # Report bugs to <[email protected]>.
 #
@@ -258,8 +258,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='PostgreSQL'
 PACKAGE_TARNAME='postgresql'
-PACKAGE_VERSION='7.4beta1'
-PACKAGE_STRING='PostgreSQL 7.4beta1'
+PACKAGE_VERSION='7.4beta2'
+PACKAGE_STRING='PostgreSQL 7.4beta2'
 PACKAGE_BUGREPORT='[email protected]'
 
 ac_unique_file="src/backend/access/common/heaptuple.c"
@@ -769,7 +769,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures PostgreSQL 7.4beta1 to adapt to many kinds of systems.
+\`configure' configures PostgreSQL 7.4beta2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -830,7 +830,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of PostgreSQL 7.4beta1:";;
+     short | recursive ) echo "Configuration of PostgreSQL 7.4beta2:";;
    esac
   cat <<\_ACEOF
 
@@ -860,7 +860,7 @@ Optional Packages:
   --with-tclconfig=DIR    tclConfig.sh and tkConfig.sh are in DIR
   --with-tkconfig=DIR     tkConfig.sh is in DIR
   --with-perl             build Perl modules (PL/Perl)
-  --with-python           build Python interface module
+  --with-python           build Python modules (PL/Python)
   --with-java             build JDBC interface and Java tools
   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]
   --with-krb5[=DIR]       build with Kerberos 5 support [/usr/athena]
@@ -949,7 +949,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-PostgreSQL configure 7.4beta1
+PostgreSQL configure 7.4beta2
 generated by GNU Autoconf 2.53
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -966,7 +966,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by PostgreSQL $as_me 7.4beta1, which was
+It was created by PostgreSQL $as_me 7.4beta2, which was
 generated by GNU Autoconf 2.53.  Invocation command line was
 
   $ $0 $@
@@ -2370,6 +2370,12 @@ fi
 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
 
+# We already have this in Makefile.win32, but configure needs it too
+if test "$PORTNAME" = "win32"
+then
+       CPPFLAGS="$CPPFLAGS -Isrc/include/port/win32"
+fi
+
 # Check if the compiler still works with the template settings
 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
@@ -2981,7 +2987,7 @@ echo "${ECHO_T}$with_perl" >&6
 
 
 #
-# Optionally build Python interface module
+# Optionally build Python modules (PL/Python)
 #
 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
@@ -4294,8 +4300,6 @@ python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
 python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
 python_configdir="${python_execprefix}/lib/python${python_version}/config"
-python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"
-python_moduleexecdir="${python_execprefix}/lib/python${python_version}/site-packages"
 python_includespec="-I${python_prefix}/include/python${python_version}"
 if test "$python_prefix" != "$python_execprefix"; then
   python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
@@ -4311,9 +4315,6 @@ echo "${ECHO_T}$python_prefix/lib/python${python_version}" >&6
 fi
 
 
-
-
-
 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
 
@@ -10815,19 +10816,23 @@ _ACEOF
 fi
 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
- if test "${ac_cv_func_accept_arg1+set}" = set; then
+ if test "${ac_cv_func_accept_return+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-   if test "${ac_cv_func_accept_arg2+set}" = set; then
+   if test "${ac_cv_func_accept_arg1+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-    if test "${ac_cv_func_accept_arg3+set}" = set; then
+    if test "${ac_cv_func_accept_arg2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-     for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
-     for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
-      for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
-       cat >conftest.$ac_ext <<_ACEOF
+     if test "${ac_cv_func_accept_arg3+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
+      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
+       for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
+        for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
+         cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 #ifdef HAVE_SYS_TYPES_H
@@ -10836,7 +10841,7 @@ else
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
+extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10863,13 +10868,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_not_found=no; break 3
+  ac_not_found=no; break 4
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 ac_not_found=yes
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
+       done
       done
      done
     done
 fi
 
 fi
- echo "$as_me:$LINENO: result: $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
-echo "${ECHO_T}$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
+
+fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
+echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
+_ACEOF
+
 
 cat >>confdefs.h <<_ACEOF
 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
@@ -11198,6 +11211,7 @@ fi
 
 
 
+HAVE_IPV6=no
 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
@@ -11319,11 +11333,13 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_IPV6 1
 _ACEOF
 
+                                                         HAVE_IPV6=yes
 fi
 
 fi
 
 
+
 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
@@ -13102,6 +13118,7 @@ fi
 #
 # For each platform, we need to know about any special compile and link
 # libraries, and whether the normal C function names are thread-safe.
+# See the comment at the top of src/port/thread.c for more information.
 #
 if test "$enable_thread_safety" = yes; then
 if test "${ac_cv_header_pthread_h+set}" = set; then
@@ -13208,8 +13225,8 @@ fi
 if test $ac_cv_header_pthread_h = yes; then
   :
 else
-  { { echo "$as_me:$LINENO: error: pthread.h not found, required for --with-threads" >&5
-echo "$as_me: error: pthread.h not found, required for --with-threads" >&2;}
+  { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safetys" >&5
+echo "$as_me: error: pthread.h not found, required for --enable-thread-safetys" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -13221,12 +13238,14 @@ Cannot enable threads on your platform.
 Please report your platform threading info to the PostgreSQL mailing lists
 so it can be added to the next release.  Report all compile flags, link flags,
 functions, or libraries required for threading support.
+See the comment at the top of src/port/thread.c for more information.
 " >&5
 echo "$as_me: error:
 Cannot enable threads on your platform.
 Please report your platform threading info to the PostgreSQL mailing lists
 so it can be added to the next release.  Report all compile flags, link flags,
 functions, or libraries required for threading support.
+See the comment at the top of src/port/thread.c for more information.
 " >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -13254,22 +13273,88 @@ _CFLAGS="$CFLAGS"
 _LIBS="$LIBS"
 CFLAGS="$CFLAGS $THREAD_CFLAGS"
 LIBS="$LIBS $THREAD_LIBS"
+echo "$as_me:$LINENO: checking for strerror_r" >&5
+echo $ECHO_N "checking for strerror_r... $ECHO_C" >&6
+if test "${ac_cv_func_strerror_r+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strerror_r (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strerror_r ();
+char (*f) ();
 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_strerror_r) || defined (__stub___strerror_r)
+choke me
+#else
+f = strerror_r;
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_strerror_r=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_strerror_r=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r" >&5
+echo "${ECHO_T}$ac_cv_func_strerror_r" >&6
+if test $ac_cv_func_strerror_r = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: strerror_r not found, required on this platform for --enable-thread-safety" >&5
+echo "$as_me: error: strerror_r not found, required on this platform for --enable-thread-safety" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-for ac_func in strerror_r getpwuid_r gethostbyname_r
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: checking for getpwuid_r" >&5
+echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
+if test "${ac_cv_func_getpwuid_r+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
+    which can conflict with char getpwuid_r (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -13277,7 +13362,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char $ac_func ();
+char getpwuid_r ();
 char (*f) ();
 
 #ifdef F77_DUMMY_MAIN
@@ -13292,10 +13377,10 @@ main ()
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
 choke me
 #else
-f = $ac_func;
+f = getpwuid_r;
 #endif
 
   ;
@@ -13314,23 +13399,95 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_func_getpwuid_r=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_getpwuid_r=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
+echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
+if test $ac_cv_func_getpwuid_r = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: getpwuid_r not found, required on this platform for --enable-thread-safety" >&5
+echo "$as_me: error: getpwuid_r not found, required on this platform for --enable-thread-safety" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
+echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname_r+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname_r (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname_r ();
+char (*f) ();
 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
+choke me
+#else
+f = gethostbyname_r;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_gethostbyname_r=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_gethostbyname_r=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
+if test $ac_cv_func_gethostbyname_r = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: gethostbyname_r not found, required on this platform for --enable-thread-safety" >&5
+echo "$as_me: error: gethostbyname_r not found, required on this platform for --enable-thread-safety" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-done
 
 CFLAGS="$_CFLAGS"
 LIBS="$_LIBS"
@@ -17838,7 +17995,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by PostgreSQL $as_me 7.4beta1, which was
+This file was extended by PostgreSQL $as_me 7.4beta2, which was
 generated by GNU Autoconf 2.53.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17900,7 +18057,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-PostgreSQL config.status 7.4beta1
+PostgreSQL config.status 7.4beta2
 configured by $0, generated by GNU Autoconf 2.53,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -18144,15 +18301,13 @@ s,@perl_privlibexp@,$perl_privlibexp,;t t
 s,@perl_useshrplib@,$perl_useshrplib,;t t
 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
 s,@PYTHON@,$PYTHON,;t t
-s,@python_version@,$python_version,;t t
 s,@python_prefix@,$python_prefix,;t t
 s,@python_execprefix@,$python_execprefix,;t t
 s,@python_configdir@,$python_configdir,;t t
-s,@python_moduledir@,$python_moduledir,;t t
-s,@python_moduleexecdir@,$python_moduleexecdir,;t t
 s,@python_includespec@,$python_includespec,;t t
 s,@python_libspec@,$python_libspec,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
+s,@HAVE_IPV6@,$HAVE_IPV6,;t t
 s,@THREAD_CFLAGS@,$THREAD_CFLAGS,;t t
 s,@THREAD_LIBS@,$THREAD_LIBS,;t t
 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
index fcd50520b3f4de7feb01d9da5c1e346b660605da..a4bcbbc8b2757ffa717a70c4bd8f2488b2247bfd 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.280 2003/08/11 18:07:38 tgl Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.280.2.1 2003/09/07 04:36:38 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -21,7 +21,7 @@ dnl The GNU folks apparently haven't heard that some people don't use
 dnl Texinfo. Use this sorcery to use "docdir" instead of "infodir".
 m4_define([info], [doc])
 m4_define([infodir], [docdir])
-AC_INIT([PostgreSQL], [7.4beta1], [[email protected]])
+AC_INIT([PostgreSQL], [7.4beta2], [[email protected]])
 m4_undefine([infodir])
 m4_undefine([info])
 AC_SUBST(docdir)
@@ -238,6 +238,12 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
 fi
 AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
 
+# We already have this in Makefile.win32, but configure needs it too
+if test "$PORTNAME" = "win32"
+then
+       CPPFLAGS="$CPPFLAGS -Isrc/include/port/win32"
+fi
+
 # Check if the compiler still works with the template settings
 AC_MSG_CHECKING([whether the C compiler still works])
 AC_TRY_LINK([], [return 0;],
@@ -362,10 +368,10 @@ AC_MSG_RESULT([$with_perl])
 AC_SUBST(with_perl)
 
 #
-# Optionally build Python interface module
+# Optionally build Python modules (PL/Python)
 #
 AC_MSG_CHECKING([whether to build Python modules])
-PGAC_ARG_BOOL(with, python, no, [  --with-python           build Python interface module])
+PGAC_ARG_BOOL(with, python, no, [  --with-python           build Python modules (PL/Python)])
 AC_MSG_RESULT([$with_python])
 AC_SUBST(with_python)
 
@@ -608,7 +614,6 @@ fi
 
 if test "$with_python" = yes; then
   PGAC_PATH_PYTHON
-  PGAC_CHECK_PYTHON_MODULE_SETUP
   PGAC_CHECK_PYTHON_EMBED_SETUP
 fi
 
@@ -833,12 +838,15 @@ AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproc
 
 AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
 
+HAVE_IPV6=no
 AC_CHECK_TYPE([struct sockaddr_in6],
               [AC_CHECK_FUNC(inet_ntop,
-                             [AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])])],
+                             [AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])
+                                                         HAVE_IPV6=yes])],
               [],
 [$ac_includes_default
 #include <netinet/in.h>])
+AC_SUBST(HAVE_IPV6)
 
 AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
 [AC_TRY_LINK(
@@ -978,9 +986,10 @@ AC_FUNC_FSEEKO
 #
 # For each platform, we need to know about any special compile and link
 # libraries, and whether the normal C function names are thread-safe.
+# See the comment at the top of src/port/thread.c for more information.
 #
 if test "$enable_thread_safety" = yes; then
-AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --with-threads])])
+AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --enable-thread-safetys])])
 
 if test "$SUPPORTS_THREADS" != yes; then
 AC_MSG_ERROR([
@@ -988,6 +997,7 @@ Cannot enable threads on your platform.
 Please report your platform threading info to the PostgreSQL mailing lists
 so it can be added to the next release.  Report all compile flags, link flags,
 functions, or libraries required for threading support.
+See the comment at the top of src/port/thread.c for more information.
 ])
 fi
 else
@@ -1014,7 +1024,12 @@ _CFLAGS="$CFLAGS"
 _LIBS="$LIBS"
 CFLAGS="$CFLAGS $THREAD_CFLAGS"
 LIBS="$LIBS $THREAD_LIBS"
-AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
+AC_CHECK_FUNC(strerror_r,
+       [], [AC_MSG_ERROR([strerror_r not found, required on this platform for --enable-thread-safety])])
+AC_CHECK_FUNC(getpwuid_r,
+       [], [AC_MSG_ERROR([getpwuid_r not found, required on this platform for --enable-thread-safety])])
+AC_CHECK_FUNC(gethostbyname_r,
+       [], [AC_MSG_ERROR([gethostbyname_r not found, required on this platform for --enable-thread-safety])])
 CFLAGS="$_CFLAGS"
 LIBS="$_LIBS"
 fi
index 3e4c19c0c90c5a701ccc6e33f5d059ead0389ad4..649ffa79b8c6c57406d8988a72fb6227598069d5 100644 (file)
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.5 2002/11/02 00:16:21 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.5.4.1 2003/09/07 04:36:39 momjian Exp $
 
 # This file contains generic rules to build many kinds of simple
 # contrib modules.  You only need to set a few variables and include
@@ -127,7 +127,7 @@ endif
 
 uninstall:
 ifneq (,$(DATA)$(DATA_built))
-       rm -f $(addprefix $(DESTDIR)$(datadir)/contrib/, $(DATA) $(DATA_built))
+       rm -f $(addprefix $(DESTDIR)$(datadir)/contrib/, $(notdir $(DATA) $(DATA_built)))
 endif
 ifdef MODULES
        rm -f $(addprefix $(DESTDIR)$(pkglibdir)/, $(addsuffix $(DLSUFFIX), $(MODULES)))
index f3aa0b8c06b7994f3744b8d2a498a2765a1e4636..469b9c043ffa293e077cce9febdd596fe9b4b253 100644 (file)
@@ -5,7 +5,6 @@ char       *token;
 int                    tokenlen;
 int                    tsearch_yylex(void);
 void           start_parse_str(char *, int);
-void           start_parse_fh(FILE *, int);
 void           end_parse(void);
 
 #endif
index 4323bda7ef003dd269757c38046db07135904986..2bf3dcba076bc13672fcd3d71215607fcb0b2430 100644 (file)
@@ -22,36 +22,6 @@ char *s     = NULL;  /* to return WHOLE hyphenated-word */
 
 YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */
 
-int lrlimit = -1;      /* for limiting read from filehandle ( -1 - unlimited read ) */
-int bytestoread = 0;   /* for limiting read from filehandle */
-
-/* redefine macro for read limited length */
-#define YY_INPUT(buf,result,max_size) \
-       if ( yy_current_buffer->yy_is_interactive ) { \
-                int c = '*', n; \
-                for ( n = 0; n < max_size && \
-                             (c = getc( tsearch_yyin )) != EOF && c != '\n'; ++n ) \
-                        buf[n] = (char) c; \
-                if ( c == '\n' ) \
-                        buf[n++] = (char) c; \
-                if ( c == EOF && ferror( tsearch_yyin ) ) \
-                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
-                result = n; \
-        }  else { \
-               if ( lrlimit == 0 ) \
-                       result=YY_NULL; \
-               else { \
-                       if ( lrlimit>0 ) { \
-                               bytestoread = ( lrlimit > max_size ) ? max_size : lrlimit; \
-                               lrlimit -= bytestoread; \
-                       } else \
-                               bytestoread = max_size; \
-                       if ( ((result = fread( buf, 1, bytestoread, tsearch_yyin )) == 0) \
-                               && ferror( tsearch_yyin ) ) \
-                               YY_FATAL_ERROR( "input in flex scanner failed" ); \
-               } \
-       }
-
 %}
 
 %option 8bit
@@ -327,13 +297,4 @@ void start_parse_str(char* str, int limit) {
        BEGIN INITIAL;
 }
 
-/* start parse from filehandle */
-void start_parse_fh( FILE* fh, int limit ) {
-       if (buf) end_parse();
-       lrlimit = ( limit ) ? limit : -1;
-       buf = tsearch_yy_create_buffer( fh, YY_BUF_SIZE );
-       tsearch_yy_switch_to_buffer( buf );
-       BEGIN INITIAL;
-}
-
 
index 6df6bcf3ba53b89491a741d952f4b6266e71a222..9c42d7a9b43a4d8bed12ef71e449e08e82bf8ab7 100644 (file)
@@ -1,10 +1,10 @@
+# $Header: /cvsroot/pgsql/contrib/tsearch2/Makefile,v 1.3.2.1 2003/09/07 04:36:39 momjian Exp $
+
 subdir = contrib/tsearch2
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
 
-override CPPFLAGS := -I$(srcdir) -I$(srcdir)/snowball -I$(srcdir)/ispell -I$(srcdir)/wordparser $(CPPFLAGS)
-
 MODULE_big = tsearch2
 OBJS = dict_ex.o dict.o snmap.o stopword.o common.o prs_dcfg.o \
        dict_snowball.o dict_ispell.o dict_syn.o \
@@ -22,30 +22,26 @@ $(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
 $(SUBDIRS:%=%-recursive):
        $(MAKE) -C $(subst -recursive,,$@) SUBSYS.o
 
+PG_CPPFLAGS = -I$(srcdir)/snowball -I$(srcdir)/ispell -I$(srcdir)/wordparser
+
+DATA = stopword/english.stop stopword/russian.stop
 DATA_built = tsearch2.sql untsearch2.sql
 DOCS = README.tsearch2
 REGRESS = tsearch2
 
-EXTRA_CLEAN = tsearch2.sql.in
-
 SHLIB_LINK := -lm
-include $(top_srcdir)/contrib/contrib-global.mk
-# DO NOT DELETE
 
-install: installstop
-
-installstop:
-       cp $(srcdir)/stopword/*.stop $(datadir)
-
-
-tsearch2.sql.in: tsearch.sql._in
-       sed 's,DATA_PATH,$(datadir),g' < $< > $@
+tsearch2.sql: tsearch.sql.in
+       sed -e 's,MODULE_PATHNAME,$$libdir/$(MODULE_big),g' \
+           -e 's,DATA_PATH,$(datadir)/contrib,g' $< >$@
 
 untsearch2.sql: untsearch.sql.in
        cp $< $@
 
+.PHONY: subclean
 clean: subclean
 
 subclean:
        for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean || exit; done
  
+include $(top_srcdir)/contrib/contrib-global.mk
index 8375d4ca773034ccdcde044a71333e9ab9eae3c6..ed2bc4179f093399ee5aed2b17c66a77ffb79de6 100644 (file)
@@ -1,17 +1,13 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>tsearch-v2-intro</title>
+  
+<link type="text/css" rel="stylesheet" href="tsearch-V2-intro_files/tsearch.txt"></head>
 
-<html>
-<head>
-  <title>tsearch-v2-intro</title>
-<link type="text/css" rel="stylesheet" href="/~megera/postgres/gist/tsearch/tsearch.css">
-</head>
 
 <body>
   <div class="content">
     <h2>Tsearch2 - Introduction</h2>
 
-    <p><a href=
-    "http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V2-intro.html">
+    <p><a href="http://www.sai.msu.su/%7Emegera/postgres/gist/tsearch/V2/docs/tsearch-V2-intro.html">
     [Online version]</a> of this document is available.</p>
 
     <p>The tsearch2 module is available to add as an extension to
 
     <p>The README.tsearch2 file included in the contrib/tsearch2
     directory contains a brief overview and history behind tsearch.
-    This can also be found online <a href=
-    "http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/">[right
+    This can also be found online <a href="http://www.sai.msu.su/%7Emegera/postgres/gist/tsearch/V2/">[right
     here]</a>.</p>
 
     <p>Further in depth documentation such as a full function
-    reference, and user guide can be found online at the <a href=
-    "http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/">[tsearch
+    reference, and user guide can be found online at the <a href="http://www.sai.msu.su/%7Emegera/postgres/gist/tsearch/V2/docs/">[tsearch
     documentation home]</a>.</p>
 
     <h3>ACKNOWLEDGEMENTS</h3>
 
     <p>Step one is to download the tsearch V2 module :</p>
 
-    <p><a href=
-    "http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/">[http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/]</a>
+    <p><a href="http://www.sai.msu.su/%7Emegera/postgres/gist/tsearch/V2/">[http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/]</a>
     (check Development History for latest stable version !)</p>
-    <pre>
-        tar -zxvf tsearch-v2.tar.gz
+    <pre>        tar -zxvf tsearch-v2.tar.gz
         mv tsearch2 PGSQL_SRC/contrib/
         cd PGSQL_SRC/contrib/tsearch2
 </pre>
 
     <p>Then continue with the regular building and installation
     process</p>
-    <pre>
-        gmake
+    <pre>        gmake
         gmake install
         gmake installcheck
 </pre>
 
     <p>That is pretty much all you have to do, unless of course you
     get errors. However if you get those, you better go check with
-    the mailing lists over at <a href=
-    "http://www.postgresql.org">http://www.postgresql.org</a> or
-    <a href=
-    "http://openfts.sourceforge.net/">http://openfts.sourceforge.net/</a>
+    the mailing lists over at <a href="http://www.postgresql.org/">http://www.postgresql.org</a> or
+    <a href="http://openfts.sourceforge.net/">http://openfts.sourceforge.net/</a>
     since its never failed for me.</p>
 
     <p>The directory in the contib/ and the directory from the
     <p>We should create a database to use as an example for the
     remainder of this file. We can call the database "ftstest". You
     can create it from the command line like this:</p>
-    <pre>
-        #createdb ftstest
+    <pre>        #createdb ftstest
 </pre>
 
     <p>If you thought installation was easy, this next bit is even
     easier. Change to the PGSQL_SRC/contrib/tsearch2 directory and
     type:</p>
-    <pre>
-        psql ftstest &lt; tsearch2.sql
+    <pre>        psql ftstest &lt; tsearch2.sql
 </pre>
 
     <p>The file "tsearch2.sql" holds all the wonderful little
     pg_ts_cfgmap are added.</p>
 
     <p>You can check out the tables if you like:</p>
-    <pre>
-        #psql ftstest
+    <pre>        #psql ftstest
         ftstest=# \d
                     List of relations
          Schema |     Name     | Type  |  Owner
     <p>The first thing we can do is try out some of the types that
     are provided for us. Lets look at the tsvector type provided
     for us:</p>
-    <pre>
-        SELECT 'Our first string used today'::tsvector;
+    <pre>        SELECT 'Our first string used today'::tsvector;
                         tsvector
         ---------------------------------------
          'Our' 'used' 'first' 'today' 'string'
     <p>The results are the words used within our string. Notice
     they are not in any particular order. The tsvector type returns
     a string of space separated words.</p>
-    <pre>
-        SELECT 'Our first string used today first string'::tsvector;
+    <pre>        SELECT 'Our first string used today first string'::tsvector;
                             tsvector
         -----------------------------------------------
          'Our' 'used' 'again' 'first' 'today' 'string'
     by the tsearch2 module.</p>
 
     <p>The function to_tsvector has 3 possible signatures:</p>
-    <pre>
-        to_tsvector(oid, text);
+    <pre>        to_tsvector(oid, text);
         to_tsvector(text, text);
         to_tsvector(text);
 </pre>
     the searchable text is broken up into words (Stemming process).
     Right now we will specify the 'default' configuration. See the
     section on TSEARCH2 CONFIGURATION to learn more about this.</p>
-    <pre>
-        SELECT to_tsvector('default',
+    <pre>        SELECT to_tsvector('default',
                            'Our first string used today first string');
                         to_tsvector
         --------------------------------------------
     <p>If you want to view the output of the tsvector fields
     without their positions, you can do so with the function
     "strip(tsvector)".</p>
-    <pre>
-        SELECT strip(to_tsvector('default',
+    <pre>        SELECT strip(to_tsvector('default',
                      'Our first string used today first string'));
                     strip
         --------------------------------
     <p>If you wish to know the number of unique words returned in
     the tsvector you can do so by using the function
     "length(tsvector)"</p>
-    <pre>
-        SELECT length(to_tsvector('default',
+    <pre>        SELECT length(to_tsvector('default',
                       'Our first string used today first string'));
          length
         --------
     <p>Lets take a look at the function to_tsquery. It also has 3
     signatures which follow the same rational as the to_tsvector
     function:</p>
-    <pre>
-        to_tsquery(oid, text);
+    <pre>        to_tsquery(oid, text);
         to_tsquery(text, text);
         to_tsquery(text);
 </pre>
 
     <p>Lets try using the function with a single word :</p>
-    <pre>
-        SELECT to_tsquery('default', 'word');
+    <pre>        SELECT to_tsquery('default', 'word');
          to_tsquery
         -----------
          'word'
 
     <p>Lets attempt to use the function with a string of multiple
     words:</p>
-    <pre>
-        SELECT to_tsquery('default', 'this is many words');
+    <pre>        SELECT to_tsquery('default', 'this is many words');
         ERROR:  Syntax error
 </pre>
 
     "tsquery" used for searching a tsvector field. What we need to
     do is search for one to many words with some kind of logic (for
     now simple boolean).</p>
-    <pre>
-        SELECT to_tsquery('default', 'searching|sentence');
+    <pre>        SELECT to_tsquery('default', 'searching|sentence');
               to_tsquery
         ----------------------
          'search' | 'sentenc'
     <p>You can not use words defined as being a stop word in your
     configuration. The function will not fail ... you will just get
     no result, and a NOTICE like this:</p>
-    <pre>
-        SELECT to_tsquery('default', 'a|is&amp;not|!the');
+    <pre>        SELECT to_tsquery('default', 'a|is&amp;not|!the');
         NOTICE:  Query contains only stopword(s)
                  or doesn't contain lexem(s), ignored
          to_tsquery
     <p>The next stage is to add a full text index to an existing
     table. In this example we already have a table defined as
     follows:</p>
-    <pre>
-        CREATE TABLE tblMessages
+    <pre>        CREATE TABLE tblMessages
         (
                 intIndex        int4,
                 strTopic        varchar(100),
     test strings for a topic, and a message. here is some test data
     I inserted. (yes I know it's completely useless stuff ;-) but
     it will serve our purpose right now).</p>
-    <pre>
-        INSERT INTO tblMessages
+    <pre>        INSERT INTO tblMessages
                VALUES ('1', 'Testing Topic', 'Testing message data input');
         INSERT INTO tblMessages
                VALUES ('2', 'Movie', 'Breakfast at Tiffany\'s');
     <p>The next stage is to create a special text index which we
     will use for FTI, so we can search our table of messages for
     words or a phrase. We do this using the SQL command:</p>
-    <pre>
-        ALTER TABLE tblMessages ADD idxFTI tsvector;
+    <pre>        ALTER TABLE tblMessages ADD COLUMN idxFTI tsvector;
 </pre>
 
     <p>Note that unlike traditional indexes, this is actually a new
 
     <p>The general rule for the initial insertion of data will
     follow four steps:</p>
-    <pre>
-    1. update table
+    <pre>    1. update table
     2. vacuum full analyze
     3. create index
     4. vacuum full analyze
     the index has been created on the table, vacuum full analyze is
     run again to update postgres's statistics (ie having the index
     take effect).</p>
-    <pre>
-        UPDATE tblMessages SET idxFTI=to_tsvector('default', strMessage);
+    <pre>        UPDATE tblMessages SET idxFTI=to_tsvector('default', strMessage);
         VACUUM FULL ANALYZE;
 </pre>
 
     information stored, you should instead do the following, which
     effectively concatenates the two fields into one before being
     inserted into the table:</p>
-    <pre>
-        UPDATE tblMessages
+    <pre>        UPDATE tblMessages
             SET idxFTI=to_tsvector('default',coalesce(strTopic,'') ||' '|| coalesce(strMessage,''));
         VACUUM FULL ANALYZE;
 </pre>
     Full Text INDEXINGi ;-)), so don't worry about any indexing
     overhead. We will create an index based on the gist function.
     GiST is an index structure for Generalized Search Tree.</p>
-    <pre>
-        CREATE INDEX idxFTI_idx ON tblMessages USING gist(idxFTI);
+    <pre>        CREATE INDEX idxFTI_idx ON tblMessages USING gist(idxFTI);
         VACUUM FULL ANALYZE;
 </pre>
 
     <p>The last thing to do is set up a trigger so every time a row
     in this table is changed, the text index is automatically
     updated. This is easily done using:</p>
-    <pre>
-        CREATE TRIGGER tsvectorupdate BEFORE UPDATE OR INSERT ON tblMessages
+    <pre>        CREATE TRIGGER tsvectorupdate BEFORE UPDATE OR INSERT ON tblMessages
             FOR EACH ROW EXECUTE PROCEDURE tsearch2(idxFTI, strMessage);
 </pre>
 
     <p>Or if you are indexing both strMessage and strTopic you
     should instead do:</p>
-    <pre>
-        CREATE TRIGGER tsvectorupdate BEFORE UPDATE OR INSERT ON tblMessages
+    <pre>        CREATE TRIGGER tsvectorupdate BEFORE UPDATE OR INSERT ON tblMessages
             FOR EACH ROW EXECUTE PROCEDURE
                 tsearch2(idxFTI, strTopic, strMessage);
 </pre>
     the tsearch2 function. Lets say we want to create a function to
     remove certain characters (like the @ symbol from all
     text).</p>
-    <pre>
-       CREATE FUNCTION dropatsymbol(text) 
+    <pre>       CREATE FUNCTION dropatsymbol(text) 
                      RETURNS text AS 'select replace($1, \'@\', \' \');' LANGUAGE SQL;
 </pre>
 
     <p>Now we can use this function within the tsearch2 function on
     the trigger.</p>
-    <pre>
-      DROP TRIGGER tsvectorupdate ON tblmessages;
+    <pre>      DROP TRIGGER tsvectorupdate ON tblmessages;
         CREATE TRIGGER tsvectorupdate BEFORE UPDATE OR INSERT ON tblMessages
             FOR EACH ROW EXECUTE PROCEDURE tsearch2(idxFTI, dropatsymbol, strMessage);
         INSERT INTO tblmessages VALUES (69, 'Attempt for dropatsymbol', '[email protected]');
     locale of the server. All you have to do is change your default
     configuration, or add a new one for your specific locale. See
     the section on TSEARCH2 CONFIGURATION.</p>
-    <pre class="real">
-   SELECT * FROM tblmessages WHERE intindex = 69;
+    <pre class="real">   SELECT * FROM tblmessages WHERE intindex = 69;
 
          intindex |         strtopic         |  strmessage   |        idxfti
         ----------+--------------------------+---------------+-----------------------   
@@ -540,8 +503,7 @@ in the tsvector column.
     <p>Lets search the indexed data for the word "Test". I indexed
     based on the the concatenation of the strTopic, and the
     strMessage:</p>
-    <pre>
-        SELECT intindex, strtopic FROM tblmessages
+    <pre>        SELECT intindex, strtopic FROM tblmessages
                                   WHERE idxfti @@ 'test'::tsquery;
          intindex |   strtopic
         ----------+---------------
@@ -553,8 +515,7 @@ in the tsvector column.
     "Testing Topic". Notice that the word I search for was all
     lowercase. Let's see what happens when I query for uppercase
     "Test".</p>
-    <pre>
-        SELECT intindex, strtopic FROM tblmessages
+    <pre>        SELECT intindex, strtopic FROM tblmessages
                                   WHERE idxfti @@ 'Test'::tsquery;
          intindex | strtopic
         ----------+----------
@@ -570,8 +531,7 @@ in the tsvector column.
     <p>Most likely the best way to query the field is to use the
     to_tsquery function on the right hand side of the @@ operator
     like this:</p>
-    <pre>
-        SELECT intindex, strtopic FROM tblmessages
+    <pre>        SELECT intindex, strtopic FROM tblmessages
                WHERE idxfti @@ to_tsquery('default', 'Test | Zeppelin');
          intindex |      strtopic
         ----------+--------------------
@@ -592,8 +552,7 @@ in the tsvector column.
     a way around which doesn't appear to have a significant impact
     on query time, and that is to use a query such as the
     following:</p>
-    <pre>
-        SELECT intindex, strTopic FROM tblmessages
+    <pre>        SELECT intindex, strTopic FROM tblmessages
                 WHERE idxfti @@ to_tsquery('default', 'gettysburg &amp; address')
                 AND strMessage ~* '.*men are created equal.*';
          intindex |           strtopic
@@ -626,8 +585,7 @@ in the tsvector column.
     english stemming. We could edit the file
     :'/usr/local/pgsql/share/english.stop' and add a word to the
     list. I edited mine to exclude my name from indexing:</p>
-    <pre>
-    - Edit /usr/local/pgsql/share/english.stop
+    <pre>    - Edit /usr/local/pgsql/share/english.stop
     - Add 'andy' to the list
     - Save the file.
 </pre>
@@ -638,16 +596,14 @@ in the tsvector column.
     connected to the DB while editing the stop words, you will need
     to end the current session and re-connect. When you re-connect
     to the database, 'andy' is no longer indexed:</p>
-    <pre>
-        SELECT to_tsvector('default', 'Andy');
+    <pre>        SELECT to_tsvector('default', 'Andy');
          to_tsvector
         ------------
         (1 row)
 </pre>
 
     <p>Originally I would get the result :</p>
-    <pre>
-        SELECT to_tsvector('default', 'Andy');
+    <pre>        SELECT to_tsvector('default', 'Andy');
          to_tsvector
         ------------
          'andi':1
@@ -660,8 +616,7 @@ in the tsvector column.
     'simple', the results would be different. There are no stop
     words for the simple dictionary. It will just convert to lower
     case, and index every unique word.</p>
-    <pre>
-        SELECT to_tsvector('simple', 'Andy andy The the in out');
+    <pre>        SELECT to_tsvector('simple', 'Andy andy The the in out');
                      to_tsvector
         -------------------------------------
          'in':5 'out':6 'the':3,4 'andy':1,2
@@ -672,8 +627,7 @@ in the tsvector column.
     into the actual configuration of tsearch2. In the examples in
     this document the configuration has always been specified when
     using the tsearch2 functions:</p>
-    <pre>
-        SELECT to_tsvector('default', 'Testing the default config');
+    <pre>        SELECT to_tsvector('default', 'Testing the default config');
         SELECT to_tsvector('simple', 'Example of simple Config');
 </pre>
 
@@ -682,8 +636,7 @@ in the tsvector column.
     contains both the 'default' configurations based on the 'C'
     locale. And the 'simple' configuration which is not based on
     any locale.</p>
-    <pre>
-        SELECT * from pg_ts_cfg;
+    <pre>        SELECT * from pg_ts_cfg;
              ts_name     | prs_name |    locale
         -----------------+----------+--------------
          default         | default  | C
@@ -706,8 +659,7 @@ in the tsvector column.
     configuration or just use one that already exists. If I do not
     specify which configuration to use in the to_tsvector function,
     I receive the following error.</p>
-    <pre>
-        SELECT to_tsvector('learning tsearch is like going to school');
+    <pre>        SELECT to_tsvector('learning tsearch is like going to school');
         ERROR:  Can't find tsearch config by locale
 </pre>
 
@@ -716,8 +668,7 @@ in the tsvector column.
     into the pg_ts_cfg table. We will call the configuration
     'default_english', with the default parser and use the locale
     'en_US'.</p>
-    <pre>
-        INSERT INTO pg_ts_cfg (ts_name, prs_name, locale)
+    <pre>        INSERT INTO pg_ts_cfg (ts_name, prs_name, locale)
                VALUES ('default_english', 'default', 'en_US');
 </pre>
 
@@ -732,15 +683,14 @@ in the tsvector column.
     tsearch2.sql</p>
 
     <p>Lets take a first look at the pg_ts_dict table</p>
-    <pre>
-        ftstest=# \d pg_ts_dict
+    <pre>        ftstest=# \d pg_ts_dict
                 Table "public.pg_ts_dict"
          Column      |  Type   | Modifiers
         -----------------+---------+-----------
          dict_name       | text    | not null
          dict_init       | oid     |
          dict_initoption | text    |
-         dict_lemmatize  | oid     | not null
+         dict_lexize     | oid     | not null
          dict_comment    | text    |
         Indexes: pg_ts_dict_idx unique btree (dict_name)
 </pre>
@@ -763,28 +713,57 @@ in the tsvector column.
     ISpell. We will assume you have ISpell installed on you
     machine. (in /usr/local/lib)</p>
 
-    <p>First lets register the dictionary(ies) to use from ISpell.
-    We will use the english dictionary from ISpell. We insert the
-    paths to the relevant ISpell dictionary (*.hash) and affixes
-    (*.aff) files. There seems to be some question as to which
-    ISpell files are to be used. I installed ISpell from the latest
-    sources on my computer. The installation installed the
-    dictionary files with an extension of *.hash. Some
-    installations install with an extension of *.dict As far as I
-    know the two extensions are equivilant. So *.hash ==
-    *.dict.</p>
-
-    <p>We will also continue to use the english word stop file that
+    <p>There has been some confusion in the past as to which files
+    are used from ISpell. ISpell operates using a hash file. This
+    is a binary file created by the ISpell command line utility
+    "buildhash". This utility accepts a file containing the words
+    from the dictionary, and the affixes file and the output is the
+    hash file. The default installation of ISPell installs the
+    english hash file english.hash, which is the exact same file as
+    american.hash. ISpell uses this as the fallback dictionary to
+    use.</p>
+
+    <p>This hash file is not what tsearch2 requires as the ISpell
+    interface. The file(s) needed are those used to create the
+    hash. Tsearch uses the dictionary words for morphology, so the
+    listing is needed not spellchecking. Regardless, these files
+    are included in the ISpell sources, and you can use them to
+    integrate into tsearch2. This is not complicated, but is not
+    very obvious to begin with. The tsearch2 ISpell interface needs
+    only the listing of dictionary words, it will parse and load
+    those words, and use the ISpell dictionary for lexem
+    processing.</p>
+
+    <p>I found the ISPell make system to be very finicky. Their
+    documentation actually states this to be the case. So I just
+    did things the command line way. In the ISpell source tree
+    under langauges/english there are several files in this
+    directory. For a complete description, please read the ISpell
+    README. Basically for the english dictionary there is the
+    option to create the small, medium, large and extra large
+    dictionaries. The medium dictionary is recommended. If the make
+    system is configured correctly, it would build and install the
+    english.has file from the medium size dictionary. Since we are
+    only concerned with the dictionary word listing ... it can be
+    created from the /languages/english directory with the
+    following command:</p>
+    <pre>   sort -u -t/ +0f -1 +0 -T /usr/tmp -o english.med english.0 english.1
+</pre>
+
+    <p>This will create a file called english.med. You can copy
+    this file to whever you like. I place mine in /usr/local/lib so
+    it coincides with the ISpell hash files. You can now add the
+    tsearch2 configuration entry for the ISpell english dictionary.
+    We will also continue to use the english word stop file that
     was installed for the en_stem dictionary. You could use a
     different one if you like. The ISpell configuration is based on
     the "ispell_template" dictionary installed by default with
     tsearch2. We will use the OIDs to the stored procedures from
     the row where the dict_name = 'ispell_template'.</p>
-    <pre>
-        INSERT INTO pg_ts_dict
+    <pre>        INSERT INTO pg_ts_dict
                (SELECT 'en_ispell',
                        dict_init,
-                       'DictFile="/usr/local/lib/english.hash",'
+                       'DictFile="/usr/local/lib/english.med",'
                        'AffFile="/usr/local/lib/english.aff",'
                        'StopFile="/usr/local/pgsql/share/english.stop"',
                        dict_lexize
@@ -792,6 +771,50 @@ in the tsvector column.
                 WHERE dict_name = 'ispell_template');
 </pre>
 
+    <p>Now that we have a dictionary we can specify it's use in a
+    query to get a lexem. For this we will use the lexize function.
+    The lexize function takes the name of the dictionary to use as
+    an argument. Just as the other tsearch2 functions operate.</p>
+    <pre>   SELECT lexize('en_ispell', 'program');
+          lexize
+        -----------
+         {program}
+        (1 row)
+</pre>
+
+    <p>If you wanted to always use the ISpell english dictionary
+    you have installed, you can configure tsearch2 to always use a
+    specific dictionary.</p>
+    <pre>  SELCECT set_curdict('en_ispell');
+</pre>
+
+    <p>Lexize is meant to turn a word into a lexem. It is possible
+    to receive more than one lexem returned for a single word.</p>
+    <pre> SELECT lexize('en_ispell', 'conditionally');
+           lexize
+        -----------------------------
+         {conditionally,conditional}
+        (1 row)
+</pre>
+
+    <p>The lexize function is not meant to take a full string as an
+    argument to return lexems for. If you passed in an entire
+    sentence, it attempts to find that entire sentence in the
+    dictionary. SInce the dictionary contains only words, you will
+    receive an empty result set back.</p>
+    <pre>      SELECT lexize('en_ispell', 'This is a senctece to lexize');
+         lexize
+        --------
+        
+        (1 row)
+        
+If you parse a lexem from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not int the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
+</pre>
+
+    <p>This is not to say that tsearch will be ignored when adding
+    text information to the the tsvector index column. This will be
+    explained in greater detail with the table pg_ts_cfgmap.</p>
+
     <p>Next we need to set up the configuration for mapping the
     dictionay use to the lexxem parsings. This will be done by
     altering the pg_ts_cfgmap table. We will insert several rows,
@@ -799,8 +822,7 @@ in the tsvector column.
     configured for use within tsearch2. There are several type of
     lexims we would be concerned with forcing the use of the ISpell
     dictionary.</p>
-    <pre>
-        INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
+    <pre>        INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
                VALUES ('default_english', 'lhword', '{en_ispell,en_stem}');
         INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
                VALUES ('default_english', 'lpart_hword', '{en_ispell,en_stem}');
@@ -818,8 +840,7 @@ in the tsvector column.
     <p>There are several other lexem types used that we do not need
     to specify as using the ISpell dictionary. We can simply insert
     values using the 'simple' stemming process dictionary.</p>
-    <pre>
-        INSERT INTO pg_ts_cfgmap
+    <pre>        INSERT INTO pg_ts_cfgmap
                VALUES ('default_english', 'url', '{simple}');
         INSERT INTO pg_ts_cfgmap
                VALUES ('default_english', 'host', '{simple}');
@@ -857,8 +878,7 @@ in the tsvector column.
     complete. We have successfully created a new tsearch2
     configuration. At the same time we have also set the new
     configuration to be our default for en_US locale.</p>
-    <pre>
-        SELECT to_tsvector('default_english',
+    <pre>        SELECT to_tsvector('default_english',
                            'learning tsearch is like going to school');
                            to_tsvector
         --------------------------------------------------
@@ -870,12 +890,37 @@ in the tsvector column.
         (1 row)
 </pre>
 
+    <p>Notice here that words like "tsearch" are still parsed and
+    indexed in the tsvector column. There is a lexem returned for
+    the word becuase in the configuration mapping table, we specify
+    words to be used from the 'en_ispell' dictionary first, but as
+    a fallback to use the 'en_stem' dictionary. Therefore a lexem
+    is not returned from en_ispell, but is returned from en_stem,
+    and added to the tsvector.</p>
+    <pre> SELECT to_tsvector('learning tsearch is like going to computer school');
+                                to_tsvector
+        ---------------------------------------------------------------------------
+         'go':5 'like':4 'learn':1 'school':8 'compute':7 'tsearch':2 'computer':7
+        (1 row)
+</pre>
+
+    <p>Notice in this last example I added the word "computer" to
+    the text to be converted into a tsvector. Because we have setup
+    our default configuration to use the ISpell english dictionary,
+    the words are lexized, and computer returns 2 lexems at the
+    same position. 'compute':7 and 'computer':7 are now both
+    indexed for the word computer.</p>
+
+    <p>You can create additional dictionarynlists, or use the extra
+    large dictionary from ISpell. You can read through the ISpell
+    documents, and source tree to make modifications as you see
+    fit.</p>
+
     <p>In the case that you already have a configuration set for
     the locale, and you are changing it to your new dictionary
     configuration. You will have to set the old locale to NULL. If
     we are using the 'C' locale then we would do this:</p>
-    <pre>
-        UPDATE pg_ts_cfg SET locale=NULL WHERE locale = 'C';
+    <pre>        UPDATE pg_ts_cfg SET locale=NULL WHERE locale = 'C';
 </pre>
 
     <p>That about wraps up the configuration of tsearch2. There is
@@ -917,38 +962,32 @@ in the tsvector column.
     <p>1) Backup any global database objects such as users and
     groups (this step is usually only necessary when you will be
     restoring to a virgin system)</p>
-    <pre>
-        pg_dumpall -g &gt; GLOBALobjects.sql
+    <pre>        pg_dumpall -g &gt; GLOBALobjects.sql
 </pre>
 
     <p>2) Backup the full database schema using pg_dump</p>
-    <pre>
-        pg_dump -s DATABASE &gt; DATABASEschema.sql
+    <pre>        pg_dump -s DATABASE &gt; DATABASEschema.sql
 </pre>
 
     <p>3) Backup the full database using pg_dump</p>
-    <pre>
-        pg_dump -Fc DATABASE &gt; DATABASEdata.tar
+    <pre>        pg_dump -Fc DATABASE &gt; DATABASEdata.tar
 </pre>
 
     <p>To Restore a PostgreSQL database that uses the tsearch2
     module:</p>
 
     <p>1) Create the blank database</p>
-    <pre>
-        createdb DATABASE
+    <pre>        createdb DATABASE
 </pre>
 
     <p>2) Restore any global database objects such as users and
     groups (this step is usually only necessary when you will be
     restoring to a virgin system)</p>
-    <pre>
-        psql DATABASE &lt; GLOBALobjects.sql
+    <pre>        psql DATABASE &lt; GLOBALobjects.sql
 </pre>
 
     <p>3) Create the tsearch2 objects, functions and operators</p>
-    <pre>
-        psql DATABASE &lt; tsearch2.sql
+    <pre>        psql DATABASE &lt; tsearch2.sql
 </pre>
 
     <p>4) Edit the backed up database schema and delete all SQL
@@ -957,13 +996,11 @@ in the tsvector column.
     tsvector types. If your not sure what these are, they are the
     ones listed in tsearch2.sql. Then restore the edited schema to
     the database</p>
-    <pre>
-        psql DATABASE &lt; DATABASEschema.sql
+    <pre>        psql DATABASE &lt; DATABASEschema.sql
 </pre>
 
     <p>5) Restore the data for the database</p>
-    <pre>
-        pg_restore -N -a -d DATABASE DATABASEdata.tar
+    <pre>        pg_restore -N -a -d DATABASE DATABASEdata.tar
 </pre>
 
     <p>If you get any errors in step 4, it will most likely be
@@ -971,5 +1008,4 @@ in the tsvector column.
     tsearch2.sql. Any errors in step 5 will mean the database
     schema was probably restored wrongly.</p>
   </div>
-</body>
-</html>
+</body></html>
\ No newline at end of file
index d0b910435392112f22336f3b7141d0713a9569cb..8571e59bbb124afd0ebb4fbe34259dd853c7e00c 100644 (file)
@@ -569,6 +569,30 @@ select to_tsquery('default', '\'the wether\':dc & \'           sKies \':BC ');
  'wether':CD & 'sky':BC
 (1 row)
 
+select to_tsquery('asd&(and|fghj)');
+   to_tsquery   
+----------------
+ 'asd' & 'fghj'
+(1 row)
+
+select to_tsquery('(asd&and)|fghj');
+   to_tsquery   
+----------------
+ 'asd' | 'fghj'
+(1 row)
+
+select to_tsquery('(asd&!and)|fghj');
+   to_tsquery   
+----------------
+ 'asd' | 'fghj'
+(1 row)
+
+select to_tsquery('(the|and&(i&1))&fghj');
+  to_tsquery  
+--------------
+ '1' & 'fghj'
+(1 row)
+
 select 'a b:89  ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca';
  ?column? 
 ----------
index 5532359b1cf813bd69d0f9bb22d15989f208ba1e..7cf3c6f8b6af8f0034ac46cc675e167f9ba1032b 100644 (file)
@@ -1,9 +1,11 @@
+# $Header: /cvsroot/pgsql/contrib/tsearch2/ispell/Attic/Makefile,v 1.3.2.1 2003/09/07 04:36:39 momjian Exp $
+
 subdir = contrib/tsearch2/ispell
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 
-override CPPFLAGS := -I$(srcdir) -I$(srcdir)/.. $(CPPFLAGS)
+PG_CPPFLAGS = -I$(srcdir)/.. $(CPPFLAGS)
 override CFLAGS += $(CFLAGS_SL)
 
 SUBOBJS = spell.o 
@@ -16,6 +18,3 @@ SUBSYS.o: $(SUBOBJS)
 EXTRA_CLEAN = SUBSYS.o $(SUBOBJS)
 
 include $(top_srcdir)/contrib/contrib-global.mk
-# DO NOT DELETE
-
-
index 0019b04f166612bd2fcf52d0971885c2329960bd..00537f4170ed3a005952afcfc2d085faa7bb1c3b 100644 (file)
@@ -52,15 +52,6 @@ Datum                to_tsquery_name(PG_FUNCTION_ARGS);
 PG_FUNCTION_INFO_V1(to_tsquery_current);
 Datum          to_tsquery_current(PG_FUNCTION_ARGS);
 
-#define END                    0
-#define ERR                    1
-#define VAL                    2
-#define OPR                    3
-#define OPEN           4
-#define CLOSE          5
-#define VALTRUE                6                       /* for stop words */
-#define VALFALSE       7
-
 /* parser's states */
 #define WAITOPERAND 1
 #define WAITOPERATOR   2
@@ -293,7 +284,7 @@ pushval_morph(QPRS_STATE * state, int typeval, char *strval, int lenval, int2 we
 
        /* XXX */
        if (prs.curwords == 0)
-               pushval_asis(state, VALTRUE, 0, 0, 0);
+               pushval_asis(state, VALSTOP, 0, 0, 0);
 }
 
 #define STACKDEPTH     32
@@ -526,7 +517,7 @@ findoprnd(ITEM * ptr, int4 *pos)
        elog(DEBUG3, (ptr[*pos].type == OPR) ?
                 "%d  %c" : "%d  %d", *pos, ptr[*pos].val);
 #endif
-       if (ptr[*pos].type == VAL || ptr[*pos].type == VALTRUE)
+       if (ptr[*pos].type == VAL || ptr[*pos].type == VALSTOP)
        {
                ptr[*pos].left = 0;
                (*pos)++;
index 4a79efdc539b3b614f06886125cd4c2807baa19b..a65dbca762fcdd55275cf758e9e8974c0f845b9c 100644 (file)
@@ -46,8 +46,7 @@ typedef struct
 #define OPR                            3
 #define OPEN                   4
 #define CLOSE                  5
-#define VALTRUE                        6               /* for stop words */
-#define VALFALSE               7
+#define VALSTOP                        6               /* for stop words */
 
 bool TS_execute(ITEM * curitem, void *checkval,
                   bool calcnot, bool (*chkcond) (void *checkval, ITEM * val));
index ac42f2c9a940441e68ac52d9e6a80655c82bcb47..4d7294cd74a773d26eb7ee31f02067df5b33673f 100644 (file)
@@ -177,6 +177,7 @@ clean_NOT_v2(ITEM * ptr, int4 *len)
 #define V_UNKNOWN      0
 #define V_TRUE         1
 #define V_FALSE                2
+#define V_STOP         3
 
 /*
  * Clean query tree from values which is always in
@@ -190,10 +191,10 @@ clean_fakeval_intree(NODE * node, char *result)
 
        if (node->valnode->type == VAL)
                return node;
-       else if (node->valnode->type == VALTRUE)
+       else if (node->valnode->type == VALSTOP)
        {
                pfree(node);
-               *result = V_TRUE;
+               *result = V_STOP;
                return NULL;
        }
 
@@ -203,65 +204,29 @@ clean_fakeval_intree(NODE * node, char *result)
                node->right = clean_fakeval_intree(node->right, &rresult);
                if (!node->right)
                {
-                       *result = (rresult == V_TRUE) ? V_FALSE : V_TRUE;
+                       *result = V_STOP;
                        freetree(node);
                        return NULL;
                }
        }
-       else if (node->valnode->val == (int4) '|')
-       {
-               NODE       *res = node;
-
-               node->left = clean_fakeval_intree(node->left, &lresult);
-               node->right = clean_fakeval_intree(node->right, &rresult);
-               if (lresult == V_TRUE || rresult == V_TRUE)
-               {
-                       freetree(node);
-                       *result = V_TRUE;
-                       return NULL;
-               }
-               else if (lresult == V_FALSE && rresult == V_FALSE)
-               {
-                       freetree(node);
-                       *result = V_FALSE;
-                       return NULL;
-               }
-               else if (lresult == V_FALSE)
-               {
-                       res = node->right;
-                       pfree(node);
-               }
-               else if (rresult == V_FALSE)
-               {
-                       res = node->left;
-                       pfree(node);
-               }
-               return res;
-       }
        else
        {
                NODE       *res = node;
 
                node->left = clean_fakeval_intree(node->left, &lresult);
                node->right = clean_fakeval_intree(node->right, &rresult);
-               if (lresult == V_FALSE || rresult == V_FALSE)
-               {
-                       freetree(node);
-                       *result = V_FALSE;
-                       return NULL;
-               }
-               else if (lresult == V_TRUE && rresult == V_TRUE)
+               if (lresult == V_STOP && rresult == V_STOP)
                {
                        freetree(node);
-                       *result = V_TRUE;
+                       *result = V_STOP;
                        return NULL;
                }
-               else if (lresult == V_TRUE)
+               else if (lresult == V_STOP)
                {
                        res = node->right;
                        pfree(node);
                }
-               else if (rresult == V_TRUE)
+               else if (rresult == V_STOP)
                {
                        res = node->left;
                        pfree(node);
index 156b1b3d399889be02e12a1b1a2710a7509603f4..3ac0ff72540edce1f1d1b678a5c71993d075afbd 100644 (file)
@@ -1,9 +1,11 @@
+# $Header: /cvsroot/pgsql/contrib/tsearch2/snowball/Attic/Makefile,v 1.3.2.1 2003/09/07 04:36:39 momjian Exp $
+
 subdir = contrib/tsearch2/snowball
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 
-override CPPFLAGS := -I$(srcdir) -I$(srcdir)/.. $(CPPFLAGS)
+PG_CPPFLAGS = -I$(srcdir)/..
 override CFLAGS += $(CFLAGS_SL)
 
 SUBOBJS = english_stem.o api.o russian_stem.o utilities.o
@@ -16,6 +18,3 @@ SUBSYS.o: $(SUBOBJS)
 EXTRA_CLEAN = SUBSYS.o $(SUBOBJS)
 
 include $(top_srcdir)/contrib/contrib-global.mk
-# DO NOT DELETE
-
-
index 0c10edb6ec9dec16fb41e8a71289fb61370913a7..d4f1021d7d88fdaf62dfa5a6ff618180ff69edaa 100644 (file)
@@ -87,6 +87,10 @@ SELECT length(to_tsvector('default', '345 [email protected] \' http://www.com/ http://ae
 select to_tsquery('default', 'qwe & sKies '); 
 select to_tsquery('simple', 'qwe & sKies '); 
 select to_tsquery('default', '\'the wether\':dc & \'           sKies \':BC ');
+select to_tsquery('asd&(and|fghj)');
+select to_tsquery('(asd&and)|fghj');
+select to_tsquery('(asd&!and)|fghj');
+select to_tsquery('(the|and&(i&1))&fghj');
 select 'a b:89  ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca';
 select 'a b:89  ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca:B';
 select 'a b:89  ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca:A';
index 56d476525f5367e5ade3dfa670508dc68b487621..fdf75eeaebbc76bea453abc7ebb69d2b222e09f9 100644 (file)
@@ -1,9 +1,11 @@
+# $Header: /cvsroot/pgsql/contrib/tsearch2/wordparser/Attic/Makefile,v 1.3.2.1 2003/09/07 04:36:39 momjian Exp $
+
 subdir = contrib/tsearch2/wordparser
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 
-override CPPFLAGS := -I$(srcdir) -I$(srcdir)/.. $(CPPFLAGS)
+PG_CPPFLAGS = -I$(srcdir)/..
 override CFLAGS += $(CFLAGS_SL)
 
 SUBOBJS =  parser.o deflex.o
@@ -23,6 +25,3 @@ SUBSYS.o: $(SUBOBJS)
 EXTRA_CLEAN = SUBSYS.o $(SUBOBJS) parser.c
 
 include $(top_srcdir)/contrib/contrib-global.mk
-# DO NOT DELETE
-
-
index 55cf0051ed02ad06c42ccb7fbebda0abce194560..1ce187419771a68758d7602cf31345bdb735ab0d 100644 (file)
@@ -5,7 +5,6 @@ char       *token;
 int                    tokenlen;
 int                    tsearch2_yylex(void);
 void           start_parse_str(char *, int);
-void           start_parse_fh(FILE *, int);
 void           end_parse(void);
 
 #endif
index 49824f55259ab2cadb3d7b0724c0b05aa09cfebf..23cfedaa201d6184ac65b7f50db703d47b380355 100644 (file)
@@ -23,36 +23,6 @@ char *s     = NULL;  /* to return WHOLE hyphenated-word */
 
 YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */
 
-int lrlimit = -1;      /* for limiting read from filehandle ( -1 - unlimited read ) */
-int bytestoread = 0;   /* for limiting read from filehandle */
-
-/* redefine macro for read limited length */
-#define YY_INPUT(buf,result,max_size) \
-       if ( yy_current_buffer->yy_is_interactive ) { \
-                int c = '*', n; \
-                for ( n = 0; n < max_size && \
-                             (c = getc( tsearch2_yyin )) != EOF && c != '\n'; ++n ) \
-                        buf[n] = (char) c; \
-                if ( c == '\n' ) \
-                        buf[n++] = (char) c; \
-                if ( c == EOF && ferror( tsearch2_yyin ) ) \
-                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
-                result = n; \
-        }  else { \
-               if ( lrlimit == 0 ) \
-                       result=YY_NULL; \
-               else { \
-                       if ( lrlimit>0 ) { \
-                               bytestoread = ( lrlimit > max_size ) ? max_size : lrlimit; \
-                               lrlimit -= bytestoread; \
-                       } else \
-                               bytestoread = max_size; \
-                       if ( ((result = fread( buf, 1, bytestoread, tsearch2_yyin )) == 0) \
-                               && ferror( tsearch2_yyin ) ) \
-                               YY_FATAL_ERROR( "input in flex scanner failed" ); \
-               } \
-       }
-
 %}
 
 %option 8bit
@@ -334,13 +304,5 @@ void start_parse_str(char* str, int limit) {
        BEGIN INITIAL;
 }
 
-/* start parse from filehandle */
-void start_parse_fh( FILE* fh, int limit ) {
-       if (buf) end_parse();
-       lrlimit = ( limit ) ? limit : -1;
-       buf = tsearch2_yy_create_buffer( fh, YY_BUF_SIZE );
-       tsearch2_yy_switch_to_buffer( buf );
-       BEGIN INITIAL;
-}
 
 
diff --git a/doc/FAQ b/doc/FAQ
index 66d3c9bbb8a74c1fd962f5bc63ae9a3ead817ae1..c0d611066017b9a8dd844e39a5d75387e7b19715 100644 (file)
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,7 +1,7 @@
 
                 Frequently Asked Questions (FAQ) for PostgreSQL
                                        
-   Last updated: Fri Jul 25 18:07:30 EDT 2003
+   Last updated: Fri Sep 5 12:42:57 EDT 2003
    
    Current maintainer: Bruce Momjian ([email protected])
    
    
    A native port to MS Win NT/2000/XP is currently being worked on. For
    more details on the current status of PostgreSQL on Windows see
-   http://techdocs.postgresql.org/guides/Windows.
+   http://techdocs.postgresql.org/guides/Windows and
+   http://candle.pha.pa.us/main/writings/pgsql/win32.html.
    
    There is also a Novell Netware 6 port at http://forge.novell.com.
    
@@ -916,7 +917,8 @@ BYTEA           bytea           variable-length byte array (null-byte safe)
 
    Finally, you could use the OID returned from the INSERT statement to
    look up the default value, though this is probably the least portable
-   approach. In Perl, using DBI with Edmund Mergl's DBD::Pg module, the
+   approach, and the oid value will wrap around when it reaches 4
+   billion. In Perl, using DBI with Edmund Mergl's DBD::Pg module, the
    oid value is made available via $sth->{pg_oid_status} after
    $sth->execute().
    
index 6d3aa8e75f6a2fac90041a8dc188ba73af7d2682..32cb546415261acc6ca36769d28571b8dd8d3e76 100644 (file)
@@ -5,8 +5,8 @@
    
    Deutsche Ãœbersetzung von Ian Barwick ([email protected]).
    
-   Letzte Aktualisierung der deutschen Ãœbersetzung: Di., den 22.07.2003,
-   16:20 CET
+   Letzte Aktualisierung der deutschen Ãœbersetzung: Di., den 02.09.2003,
+   10:00 CET
    
    Die aktuellste Version dieses Dokuments liegt auf der PostgreSQL
    Website:
@@ -1063,9 +1063,12 @@ BYTEA         bytea           Bytearray mit variabler L
 
    Schließlich besteht noch die Möglichkeit, den von einer
    INSERT-Anweisung zurückgelieferten OID-Wert als einmaligen Wert zu
-   verwenden. In Perl mit dem DBD::Pg-Modul von Edmund Mergl wird der
-   OID-Wert nach einem $sth->excute() Ã¼ber $sth->{pg_oid_status}
-   zurückgeliefert.
+   verwenden. Dieser Ansatz ist allerdings PostgreSQL-spezifisch;
+   außerdem wird nach ca. 4 Milliarden Einträgen der OID-Wert wieder auf
+   eine kleine Zahl gesetzt, ist also nicht garantiert einmalig.
+   
+   In Perl mit dem DBD::Pg-Modul wird der OID-Wert nach einem
+   $sth->excute() Ã¼ber $sth->{pg_oid_status} zurückgeliefert.
    
     4.15.3) Führen currval() und nextval() zu einer Race-Condition mit anderen
     Nutzern?
@@ -1278,15 +1281,21 @@ BYTEA         bytea           Bytearray mit variabler L
     4.28) Welche Möglichkeiten zur Verschlüsselung gibt es?
     
      * contrib/pgcrypto enthält diverse Funktionen für die Benützung mit
-       SQL-Abfragen;
-     * die einzige Möglichkeit, Kommunikationen zwischen Client und
-       Server zu verschlüsseln, ist durch die Anwendung von hostssl in
-       pg_hba.conf;
+       SQL-Abfragen.
+     * Um Verbindungen zwischen dem Server und Client-Anwendungen zu
+       verschlüsseln, muss in der Server-Konfigurationsdatei
+       postgresql.conf die ssl-Option auf true (Voreinstellung: false)
+       gesetzt werden und ein passender host- bzw. hostssl-Eintrag muss
+       in pg_hba.conf vorhanden sein. Zudem muss die sslmode-Einstellung
+       beim Client nicht auf disable gesetzt werden. (Bitte beachten Sie
+       auch, daß neben der eingebauten SSL-Unterstützung verschlüsselte
+       Verbindungen auch Ã¼ber externe Anwendungen wie stunnel oder ssh
+       aufgebaut werden können).
      * Die Passwörter der Datenbanknutzer werden ab Version 7.3
        automatisch verschlüsselt (in früheren Versionen muß der Parameter
        PASSWORD_ENCRYPTION in postgresql.conf explizit eingeschaltet
-       werden);
-     * der Server läuft auf einem verschlüsselten Dateisystem.
+       werden).
+     * Betrieb des Servers auf einem verschlüsselten Dateisystem.
      _________________________________________________________________
    
                             PostgreSQL erweitern
@@ -1326,10 +1335,15 @@ BYTEA         bytea           Bytearray mit variabler L
    Die englische Vorlage dieser FAQ wird ständig Ã¼berarbeitet. Daher
    liegt die Ãœbersetzung nicht immer auf dem aktuellsten Stand.
    
+   Die aktuellste Version der deutschen Ãœbersetzung befindet sich immer
+   unter http://sql-info.de/postgresql/FAQ_german.html. Diese
+   "Arbeitsversion" enthält eventuell Ã„nderungen, die noch nicht auf der
+   PostgreSQL-Website eingebunden worden sind.
+   
    Ãœber Verbesserungshinweise und Korrekturvorschläge sowie
    Verständnisfragen zum Inhalt der FAQ freue ich mich. Ich nehme auch
-   allgemeine Fragen zu PostgreSQL gerne entgegen, kann aber leider keine
-   zeitige Antwort garantieren.
+   allgemeine Fragen zu PostgreSQL gerne entgegen, verweise jedoch auf
+   die Mailing-Listen als schnelle und zuverlässige Anlaufstellen.
    
    Diese Ãœbersetzung basiert teilweise auf einer früheren Ãœbersetzung von
    Karsten Schulz ([email protected]).
index d2b7b40a9f4d40198cb351d2215a19db52328ef6..c1a355900996e1593b76a02ff2ce8cab25cae0ba 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,6 +1,6 @@
 TODO list for PostgreSQL
 ========================
-Last updated:          Tue Aug 12 18:04:15 EDT 2003
+Last updated:          Fri Sep  5 15:52:01 EDT 2003
 
 Current maintainer:    Bruce Momjian ([email protected])
 
@@ -52,7 +52,7 @@ Administration
 * Allow configuration files to be specified in a different directory
 * -Add start time to pg_stat_activity
 * Allow limits on per-db/user connections
-* Have standalone backend read postgresql.conf
+* -Have standalone backend read postgresql.conf (Tom)
 * Add group object ownership, so groups can rename/drop/grant on objects,
   so we can implement roles
 * Add the concept of dataspaces/tablespaces [tablespaces]
@@ -62,6 +62,8 @@ Administration
 * Allow server log information to be output as INSERT statements
 * Prevent default re-use of sysids for dropped users and groups
 * Prevent dropping user that still owns objects, or auto-drop the objects
+* Allow pooled connections to query prepared queries
+* Allow pooled connections to close all open WITH HOLD cursors
 
 
 
@@ -88,6 +90,10 @@ Data Types
   from making invalid dates valid
 * -Prevent month/day swapping of ISO dates to make invalid dates valid
 * Have initdb set DateStyle based on locale?
+* Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
+* Add ALTER DOMAIN, AGGREGATE, CONVERSION, SEQUENCE ... OWNER TO
+* Allow to_char to print localized month names (Karel)
+
 
 * ARRAYS
        o Allow nulls in arrays
@@ -117,6 +123,8 @@ Multi-Language Support
 * Prevent mismatch of frontend/backend encodings from converting bytea
   data from being interpreted as encoded strings
 * -Remove Cyrillic recode support
+* Fix upper()/lower() to work for multibyte encodings
+
 
  
 Views / Rules
@@ -142,7 +150,7 @@ Indexes
   INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
   [inheritance]
 * Add UNIQUE capability to non-btree indexes
-* Add btree index support for reltime, tinterval, regproc
+* -Add btree index support for reltime, tinterval, regproc (Tom)
 * Add rtree index support for line, lseg, path, point
 * -Certain indexes will not shrink, e.g. indexes on ever-increasing
   columns and indexes with many duplicate keys
@@ -160,7 +168,7 @@ Indexes
   float4, numeric/decimal too [optimizer]
 * Add FILLFACTOR to btree index creation
 * Add concurrency to GIST
-* Improve concurrency of hash indexes (Neil)
+* -Improve concurrency of hash indexes (Tom)
 * Allow a single index to index multiple tables (for inheritance and subtables)
 
 
@@ -188,6 +196,8 @@ Commands
 * -Have SELECT '13 minutes'::interval display zero seconds in ISO datestyle
 * Prevent COMMENT ON DATABASE from using a database name
 * Add GUC variable to prevent waiting on locks
+* Allow TRUNCATE ... CASCADE/RESTRICT
+* Allow PREPARE of cursors
 
 
 * ALTER
@@ -204,6 +214,7 @@ Commands
        o Allow ALTER TABLE to modify column lengths and change to binary
          compatible types
        o Add ALTER DATABASE ... OWNER TO newowner
+       o Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
 
 * CLUSTER
        o Automatically maintain clustering on a table
@@ -267,7 +278,7 @@ Clients
 * -Allow psql to show transaction status if backend protocol changes made
 * -Add schema, cast, and conversion backslash commands to psql (Christopher)
 * -Allow pg_dump to dump a specific schema (Neil Conway)
-* Allow psql to do table completion for SELECT * FROM schema_part and
+* -Allow psql to do table completion for SELECT * FROM schema_part and
   table completion for SELECT * FROM schema_name.
 * Add XML capability to pg_dump and COPY, when backend XML capability
 * -Allow SSL-enabled clients to turn off SSL transfers
@@ -276,6 +287,7 @@ Clients
 * Allow psql \du to show groups, and add \dg for groups
 * Allow clients to query WITH HOLD cursors and prepared statements
 * Prevent unneeded quoting in psql \d output using fmtId()
+* Add a libpq function to support Parse/DescribeStatement capability
 
 
 * JDBC
@@ -326,7 +338,8 @@ Referential Integrity
 * Support triggers on columns (Neil)
 * Have AFTER triggers execute after the appropriate SQL statement in a 
   function, not at the end of the function
-
+* Print table names with constraint names in error messages, or make constraint
+  names unique within a schema
 
 Dependency Checking
 ===================
@@ -381,6 +394,8 @@ Vacuum
 * Provide automatic running of vacuum in the background in backend
   rather than in /contrib [vacuum]
 * Allow free space map to be auto-sized or warn when it is too small
+* Maintain a map of recently-expired of pages so vacuum can reclaim
+  free space without a sequential scan
 
 
 Locking
@@ -479,7 +494,7 @@ Source Code
 * Acquire lock on a relation before building a relcache entry for it
 * Research interaction of setitimer() and sleep() used by statement_timeout
 * Add checks for fclose() failure
-* Change CVS $Id: TODO,v 1.1115 2003/08/13 03:12:04 momjian Exp $ to $PostgreSQL: pgsql/doc/TODO,v 1.1115 2003/08/13 03:12:04 momjian Exp $
+* Change CVS $Id: TODO,v 1.1115.2.1 2003/09/07 04:36:40 momjian Exp $ to $PostgreSQL: pgsql/doc/TODO,v 1.1115.2.1 2003/09/07 04:36:40 momjian Exp $
 * Exit postmaster if postgresql.conf can not be opened
 * Rename /scripts directory because they are all C programs now
 * Allow the regression tests to start postmaster with -i so the tests
index 641a3de6ea2c9b82cc74eedb2007c6494433d448..2983f0519d38c9c930da10e63716871ee480b255 100644 (file)
@@ -10,7 +10,7 @@
   alink="#0000ff">
     <H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
 
-    <P>Last updated: Fri Jul 25 18:07:30 EDT 2003</P>
+    <P>Last updated: Fri Sep  5 12:42:57 EDT 2003</P>
 
     <P>Current maintainer: Bruce Momjian (<A href=
     "mailto:[email protected]">[email protected]</A>)<BR>
     <p>A native port to MS Win NT/2000/XP is currently being worked
     on. For more details on the current status of PostgreSQL on Windows see
     <a href="http://techdocs.postgresql.org/guides/Windows">
-    http://techdocs.postgresql.org/guides/Windows</a>.</p>
+    http://techdocs.postgresql.org/guides/Windows</a> and
+    <a href="http://candle.pha.pa.us/main/writings/pgsql/win32.html">
+    http://candle.pha.pa.us/main/writings/pgsql/win32.html</a>.</p>
 
     <p>There is also a Novell Netware 6 port at
     <a href="http://forge.novell.com">http://forge.novell.com</a>.</p>
@@ -1152,7 +1154,8 @@ BYTEA           bytea           variable-length byte array (null-byte safe)
 
     Finally, you could use the <A href="#4.16"><SMALL>OID</SMALL></A>
     returned from the <SMALL>INSERT</SMALL> statement to look up the
-    default value, though this is probably the least portable approach.
+    default value, though this is probably the least portable approach,
+    and the oid value will wrap around when it reaches 4 billion.
     In Perl, using DBI with Edmund Mergl's DBD::Pg module, the oid
     value is made available via <I>$sth-&gt;{pg_oid_status}</I> after
     <I>$sth-&gt;execute()</I>.
index 60752bcb5b2ab1fd64a132710b71ba48908f9918..5042cdfdca979c2b1d7eb3c06052ebee429f5926 100644 (file)
@@ -14,7 +14,7 @@ href="mailto:[email protected]">[email protected]</a>).</p>
 
     <p>Deutsche Ãœbersetzung von Ian Barwick (<a href="mailto:[email protected]">[email protected]</a>).</p>
 
-    <p>Letzte Aktualisierung der deutschen Ãœbersetzung: Di., den 22.07.2003, 16:20 CET</p>
+    <p>Letzte Aktualisierung der deutschen Ãœbersetzung: Di., den 02.09.2003, 10:00 CET</p>
 
     <p>Die aktuellste Version dieses Dokuments liegt auf der PostgreSQL Website:</p>
     <ul>
@@ -1060,8 +1060,12 @@ BYTEA         bytea           Bytearray mit variabler L
     new_id = output of execute("SELECT currval('person_id_seq')");
 </pre>
     <p>Schließlich besteht noch die Möglichkeit, den von einer <small>INSERT</small>-Anweisung
-    zurückgelieferten <small>OID</small>-Wert als einmaligen Wert zu verwenden.
-    In Perl mit dem <em>DBD::Pg</em>-Modul von Edmund Mergl wird der OID-Wert nach einem
+    zurückgelieferten <a href="#4.16"><small>OID</small></a>-Wert als einmaligen Wert zu verwenden.
+    Dieser Ansatz ist allerdings PostgreSQL-spezifisch; außerdem wird nach 
+    ca. 4 Milliarden Einträgen der <small>OID</small>-Wert wieder auf eine kleine Zahl
+    gesetzt, ist also nicht garantiert einmalig.</p>
+
+    <p>In Perl mit dem <em>DBD::Pg</em>-Modul wird der OID-Wert nach einem
     <em>$sth->excute()</em> Ã¼ber <em>$sth->{pg_oid_status}</em> zurückgeliefert.</p>
 
     <h4><a name="4.15.3">4.15.3</a>) Führen <em>currval()</em> und <em>nextval()</em> zu einer Race-Condition mit anderen
@@ -1285,13 +1289,21 @@ BYTEA         bytea           Bytearray mit variabler L
 
     <ul>
     <li><em>contrib/pgcrypto</em> enthält diverse Funktionen für die Benützung mit
-      SQL-Abfragen;</li>
-    <li>die einzige Möglichkeit, Kommunikationen zwischen Client und Server
-      zu verschlüsseln, ist durch die Anwendung von <em>hostssl</em> in <em>pg_hba.conf</em>;</li>
+      SQL-Abfragen.</li>
+
+    <li>Um Verbindungen zwischen dem Server und Client-Anwendungen zu
+      verschlüsseln, muss in der Server-Konfigurationsdatei <em>postgresql.conf</em>
+      die <em>ssl</em>-Option auf <em>true</em> (Voreinstellung: <em>false</em>) gesetzt werden
+      und ein passender <em>host</em>- bzw. <em>hostssl</em>-Eintrag muss in 
+      <em>pg_hba.conf</em> vorhanden sein. Zudem muss die <em>sslmode</em>-Einstellung
+      beim Client nicht auf <em>disable</em> gesetzt werden. (Bitte beachten Sie auch,
+      daß neben der eingebauten SSL-Unterstützung verschlüsselte Verbindungen 
+      auch Ã¼ber externe Anwendungen wie <em>stunnel</em> oder <em>ssh</em> aufgebaut werden können).</li>
+
     <li>Die Passwörter der Datenbanknutzer werden ab Version 7.3 automatisch
       verschlüsselt (in früheren Versionen muß der Parameter <em>PASSWORD_ENCRYPTION</em>
-      in <em>postgresql.conf</em> explizit eingeschaltet werden);</li>
-    <li>der Server läuft auf einem verschlüsselten Dateisystem.</li>
+      in <em>postgresql.conf</em> explizit eingeschaltet werden).</li>
+    <li>Betrieb des Servers auf einem verschlüsselten Dateisystem.</li>
     </ul>
 
     <hr />
@@ -1333,9 +1345,15 @@ BYTEA         bytea           Bytearray mit variabler L
     <p>Die englische Vorlage dieser FAQ wird ständig Ã¼berarbeitet. Daher liegt
     die Ãœbersetzung nicht immer auf dem aktuellsten Stand.</p>
 
+    <p>Die aktuellste Version der deutschen Ãœbersetzung befindet sich immer unter
+    <a href="http://sql-info.de/postgresql/FAQ_german.html">http://sql-info.de/postgresql/FAQ_german.html</a>.
+    Diese "Arbeitsversion" enthält eventuell Ã„nderungen, die noch nicht auf der 
+    PostgreSQL-Website eingebunden worden sind.</p>
+
     <p>Über Verbesserungshinweise und Korrekturvorschläge sowie Verständnisfragen
     zum Inhalt der FAQ freue ich mich. Ich nehme auch allgemeine Fragen zu PostgreSQL gerne
-    entgegen, kann aber leider keine zeitige Antwort garantieren.</p>
+    entgegen, verweise jedoch auf die Mailing-Listen als schnelle und zuverlässige
+    Anlaufstellen.</p>
 
     <p>Diese Ãœbersetzung basiert teilweise auf einer früheren Ãœbersetzung von Karsten
     Schulz (<a href="mailto:[email protected]">[email protected]</a>).</p>
index 42551d240749e587b25318d546771f602300a239..22f8e427df2bdcdeb4b9fdd1d935591f70b642b0 100644 (file)
@@ -2,7 +2,7 @@
 #
 # PostgreSQL documentation makefile
 #
-# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.57 2003/04/10 01:22:44 petere Exp $
+# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.57.2.1 2003/09/07 04:36:40 momjian Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -48,7 +48,7 @@ endif
 
 # Enable draft mode during development
 ifneq (,$(findstring devel, $(VERSION)))
-JADEFLAGS += -V draft-mode
+override JADEFLAGS += -V draft-mode
 endif
 
 
@@ -82,7 +82,7 @@ html: postgres.sgml $(ALLSGML) stylesheet.dsl
        $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-html -t sgml $<
 
 
-COLLATEINDEX := $(PERL) $(COLLATEINDEX) -f -g
+COLLATEINDEX := LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g
 
 ifeq (,$(wildcard HTML.index))
 bookindex.sgml:
index d6d7881ef389076d2b1a91f8db7bf4511266baa3..a0b4726a91945afa69cb28f3a1688a93e796effd 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.34 2003/03/25 16:15:35 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.34.2.1 2003/09/07 04:36:40 momjian Exp $
 -->
 
  <chapter id="tutorial-advanced">
@@ -142,7 +142,7 @@ ERROR:  &lt;unnamed&gt; referential integrity violation - key referenced from we
    <title>Transactions</title>
 
    <indexterm zone="tutorial-transactions">
-    <primary>transactions</primary>
+    <primary>transaction</primary>
    </indexterm>
 
    <para>
index fabf2e732cd9ae9b74aa82bbaf7fec37cf4c9e41..a06c00cd3481bc9d2d149438cd7ab4fea05addd8 100644 (file)
@@ -1,10 +1,10 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.29 2003/08/09 22:50:21 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.29.2.1 2003/09/07 04:36:40 momjian Exp $ -->
 
 <sect1 id="arrays">
  <title>Arrays</title>
 
  <indexterm>
-  <primary>arrays</primary>
+  <primary>array</primary>
  </indexterm>
 
  <para>
@@ -162,7 +162,6 @@ ERROR:  multidimensional arrays must have array expressions with matching dimens
   expression syntax is discussed in more detail in <xref
   linkend="sql-syntax-array-constructors">.
  </para>
-
  </sect2>
 
  <sect2>
@@ -326,9 +325,9 @@ UPDATE sal_emp SET pay_by_quarter[1:2] = '{27000,27000}'
   <literal>||</literal>.
 <programlisting>
 SELECT ARRAY[1,2] || ARRAY[3,4];
  ?column?
----------------
- {{1,2},{3,4}}
+ ?column?
+-----------
+ {1,2,3,4}
 (1 row)
 
 SELECT ARRAY[5,6] || ARRAY[[1,2],[3,4]];
@@ -337,27 +336,68 @@ SELECT ARRAY[5,6] || ARRAY[[1,2],[3,4]];
  {{5,6},{1,2},{3,4}}
 (1 row)
 </programlisting>
+ </para>
 
+ <para>
   The concatenation operator allows a single element to be pushed on to the
   beginning or end of a one-dimensional array. It also accepts two
   <replaceable>N</>-dimensional arrays, or an <replaceable>N</>-dimensional
-  and an <replaceable>N+1</>-dimensional array. In the former case, the two
-  <replaceable>N</>-dimension arrays become outer elements of an
-  <replaceable>N+1</>-dimensional array. In the latter, the
-  <replaceable>N</>-dimensional array is added as either the first or last
-  outer element of the <replaceable>N+1</>-dimensional array.
-
-  When extending an array by concatenation, the subscripts of its existing
-  elements are preserved. For example, when pushing
-  onto the beginning of an array with one-based subscripts, the resulting
-  array has zero-based subscripts:
+  and an <replaceable>N+1</>-dimensional array.
+ </para>
 
+ <para>
+  When a single element is pushed on to the beginning of a one-dimensional
+  array, the result is an array with a lower bound subscript equal to
+  the righthand operand's lower bound subscript, minus one. When a single
+  element is pushed on to the end of a one-dimensional array, the result is
+  an array retaining the lower bound of the lefthand operand. For example:
 <programlisting>
 SELECT array_dims(1 || ARRAY[2,3]);
  array_dims
 ------------
  [0:2]
 (1 row)
+
+SELECT array_dims(ARRAY[1,2] || 3);
+ array_dims
+------------
+ [1:3]
+(1 row)
+</programlisting>
+ </para>
+
+ <para>
+  When two arrays with an equal number of dimensions are concatenated, the
+  result retains the lower bound subscript of the lefthand operand's outer
+  dimension. The result is an array comprising every element of the lefthand
+  operand followed by every element of the righthand operand. For example:
+<programlisting>
+SELECT array_dims(ARRAY[1,2] || ARRAY[3,4,5]);
+ array_dims
+------------
+ [1:5]
+(1 row)
+
+SELECT array_dims(ARRAY[[1,2],[3,4]] || ARRAY[[5,6],[7,8],[9,0]]);
+ array_dims
+------------
+ [1:5][1:2]
+(1 row)
+</programlisting>
+ </para>
+
+ <para>
+  When an <replaceable>N</>-dimensional array is pushed on to the beginning
+  or end of an <replaceable>N+1</>-dimensional array, the result is
+  analogous to the element-array case above. Each <replaceable>N</>-dimensional
+  sub-array is essentially an element of the <replaceable>N+1</>-dimensional
+  array's outer dimension. For example:
+<programlisting>
+SELECT array_dims(ARRAY[1,2] || ARRAY[[3,4],[5,6]]);
+ array_dims
+------------
+ [0:2][1:2]
+(1 row)
 </programlisting>
  </para>
 
@@ -386,9 +426,9 @@ SELECT array_append(ARRAY[1,2], 3);
 (1 row)
 
 SELECT array_cat(ARRAY[1,2], ARRAY[3,4]);
  array_cat
----------------
- {{1,2},{3,4}}
+ array_cat
+-----------
+ {1,2,3,4}
 (1 row)
 
 SELECT array_cat(ARRAY[[1,2],[3,4]], ARRAY[5,6]);
index 6e7e9cbf0be0581e3225f173fc13ce8ea4bea269..204ffa5b838f921b515a3779cc92aaacb7ac3947 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.27 2003/08/01 01:01:52 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.27.2.1 2003/09/07 04:36:40 momjian Exp $
 -->
 <chapter id="backup">
  <title>Backup and Restore</title>
@@ -153,6 +153,12 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
     </para>
    </important>
 
+   <tip>
+    <para>
+    Restore performance can be improved by increasing <literal>SORT_MEM</>
+    (see <xref linkend="runtime-config-resource-memory">).
+    </para>
+   </tip>
   </sect2>
 
   <sect2 id="backup-dump-all">
@@ -279,13 +285,15 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c
    </para>
 
    <para>
-    For reasons of backward compatibility, <application>pg_dump</> does
-    not dump large objects by default. To dump large objects you must use 
-    either the custom or the TAR output format, and use the <option>-b</> option in 
-    <application>pg_dump</>. See the reference pages for details.
-    The directory <filename>contrib/pg_dumplo</> of the
-    <productname>PostgreSQL</> source tree also contains a program that can
-    dump large objects.
+    For reasons of backward compatibility, <application>pg_dump</>
+    does not dump large objects by default.<indexterm><primary>large
+    object</primary><secondary>backup</secondary></indexterm> To dump
+    large objects you must use either the custom or the TAR output
+    format, and use the <option>-b</> option in
+    <application>pg_dump</>. See the reference pages for details.  The
+    directory <filename>contrib/pg_dumplo</> of the
+    <productname>PostgreSQL</> source tree also contains a program
+    that can dump large objects.
    </para>
 
    <para>
@@ -365,7 +373,15 @@ tar -cf backup.tar /usr/local/pgsql/data
 
  <sect1 id="migration">
   <title>Migration between releases</title>
-  <indexterm zone="migration"><primary>upgrading</></>
+
+  <indexterm zone="migration">
+   <primary>upgrading</primary>
+  </indexterm>
+
+  <indexterm zone="migration">
+   <primary>version</primary>
+   <secondary>compatibility</secondary>
+  </indexterm>
 
   <para>
    As a general rule, the internal data storage format is subject to
index fb9db34019ce2533faee787f158886b141badad9..ec2ada9b4889421776acac22106dfe057eb248cf 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.37 2003/08/04 04:03:03 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.37.2.1 2003/09/07 04:36:40 momjian Exp $ -->
 
 <chapter id="charset">
  <title>Localization</>
@@ -197,7 +197,7 @@ initdb --locale=sv_SE
      <listitem>
       <para>
        Sort order in queries using <command>ORDER BY</>
-       <indexterm><primary>ORDER BY</></>
+       <indexterm><primary>ORDER BY</><secondary>and locales</></indexterm>
       </para>
      </listitem>
 
index e6180c762eec9e5f8fd082cf93087d846195e5b7..0564779552ac39e847e7215ec842813c84d06db5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.53 2003/07/26 13:50:01 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.53.2.1 2003/09/07 04:36:40 momjian Exp $
 -->
 
 <chapter id="client-authentication">
@@ -199,13 +199,17 @@ hostnossl  <replaceable>database</replaceable>  <replaceable>user</replaceable>
 <programlisting>
 (<replaceable>actual-IP-address</replaceable> xor <replaceable>IP-address-field</replaceable>) and <replaceable>IP-mask-field</replaceable>
 </programlisting>
-       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</> 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.
+       must be zero for the record to match.
+      </para>
+
+      <para>
+       An IP address given in IPv4 format will match IPv6 connections that
+       have the corresponding address, for example <literal>127.0.0.1</>
+       will match the IPv6 address <literal>::ffff:127.0.0.1</>.  An entry
+       given in IPv6 format will match only IPv6 connections, even if the
+       represented address is in the IPv4-in-IPv6 range.  Note that entries
+       in IPv6 format will be rejected if the system's C library does not have
+       support for IPv6 addresses.
       </para>
 
       <para>
@@ -219,9 +223,10 @@ hostnossl  <replaceable>database</replaceable>  <replaceable>user</replaceable>
      <term><replaceable>CIDR-mask</replaceable></term>
      <listitem>
       <para>
-        This is an integer specifying the number of significant bits 
-        to set in the mask, and is an alternative to using the 
-        <replaceable>IP-mask</replaceable> notation. The number must
+        This field may be used as an alternative to the 
+        <replaceable>IP-mask</replaceable> notation.  It is an
+       integer specifying the number of high-order bits 
+        to set in the mask.  The number must
         be between 0 and 32 (in the case of an IPv4 address) or 128
         (in the case of an IPv6 address) inclusive. 0 will match any
         address, while 32/128 will match only the exact host specified.
@@ -451,6 +456,11 @@ local   all         all                                             trust
 # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
 host    all         all         127.0.0.1         255.255.255.255   trust     
 
+# The same as the last line but using a CIDR mask
+#
+# TYPE  DATABASE    USER        IP-ADDRESS/CIDR-mask  METHOD
+host    all         all         127.0.0.1/32          trust     
+
 # Allow any user from any host with IP address 192.168.93.x to connect
 # to database "template1" as the same user name that ident reports for
 # the connection (typically the Unix user name).
@@ -458,6 +468,11 @@ host    all         all         127.0.0.1         255.255.255.255   trust
 # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
 host    template1   all         192.168.93.0      255.255.255.0     ident sameuser
 
+# The same as the last line but using a CIDR mask
+#
+# TYPE  DATABASE    USER        IP-ADDRESS/CIDR-mask  METHOD
+host    template1   all         192.168.93.0/24       ident sameuser
+
 # Allow a user from host 192.168.12.10 to connect to database
 # "template1" if the user's password is correctly supplied.
 # 
@@ -566,6 +581,7 @@ local   db1,db2,@demodbs  all                                       md5
    </indexterm>
    <indexterm>
     <primary>password</primary>
+    <secondary>authentication</secondary>
    </indexterm>
 
    <para>
@@ -610,16 +626,21 @@ local   db1,db2,@demodbs  all                                       md5
 
    <para>
     <productname>Kerberos</productname> is an industry-standard secure
-    authentication system suitable for distributed computing over a
-    public network. A description of the
-    <productname>Kerberos</productname> system is far beyond the scope
-    of this document; in all generality it can be quite complex (yet
-    powerful). The <ulink
+    authentication system suitable for distributed computing over a public
+    network. A description of the <productname>Kerberos</productname> system
+    is far beyond the scope of this document; in all generality it can be
+    quite complex (yet powerful). The <ulink
     url="http://www.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html">Kerberos
-    <acronym>FAQ</></ulink> or <ulink
-    url="ftp://athena-dist.mit.edu">MIT Project Athena</ulink> can be
-    a good starting point for exploration. Several sources for
-    <productname>Kerberos</> distributions exist.
+    <acronym>FAQ</></ulink> or <ulink url="ftp://athena-dist.mit.edu">MIT
+    Project Athena</ulink> can be a good starting point for exploration.
+    Several sources for <productname>Kerberos</> distributions exist.
+   </para>
+
+   <para>
+    While <productname>PostgreSQL</> supports both Kerberos 4 and 
+    Kerberos 5, only Kerberos 5 is recommended.  Kerberos 4 is
+    considered insecure and no longer recommended for general
+    use.
    </para>
 
    <para>
@@ -850,6 +871,10 @@ omicron       bryanh            guest1
   <sect2 id="auth-pam">
    <title>PAM Authentication</title>
 
+   <indexterm zone="auth-pam">
+    <primary>PAM</primary>
+   </indexterm>
+
    <para>
     This authentication method operates similarly to
     <literal>password</literal> except that it uses PAM (Pluggable
index b8053f94e5532a5f8121a4a1ae5c7f72b84db366..295cbd779a06f074b8c8d8b4cac34f7cc5a11276 100644 (file)
@@ -1,17 +1,17 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.122 2003/08/09 22:50:21 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.122.2.1 2003/09/07 04:36:40 momjian Exp $
 -->
 
  <chapter id="datatype">
   <title id="datatype-title">Data Types</title>
 
   <indexterm zone="datatype">
-   <primary>data types</primary>
+   <primary>data type</primary>
   </indexterm>
 
   <indexterm>
-   <primary>types</primary>
-   <see>data types</see>
+   <primary>type</primary>
+   <see>data type</see>
   </indexterm>
 
   <para>
@@ -279,68 +279,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.122 2003/08/09 22:50:21 t
    <title>Numeric Types</title>
 
    <indexterm zone="datatype-numeric">
-    <primary>data types</primary>
+    <primary>data type</primary>
     <secondary>numeric</secondary>
    </indexterm>
 
-   <indexterm zone="datatype-numeric">
-    <primary>integer</primary>
-   </indexterm>
-
-   <indexterm zone="datatype-numeric">
-    <primary>smallint</primary>
-   </indexterm>
-
-   <indexterm zone="datatype-numeric">
-    <primary>bigint</primary>
-   </indexterm>
-
-   <indexterm>
-    <primary>int4</primary>
-    <see>integer</see>
-   </indexterm>
-
-   <indexterm>
-    <primary>int2</primary>
-    <see>smallint</see>
-   </indexterm>
-
-   <indexterm>
-    <primary>int8</primary>
-    <see>bigint</see>
-   </indexterm>
-
-   <indexterm zone="datatype-numeric">
-    <primary>numeric (data type)</primary>
-   </indexterm>
-
-   <indexterm>
-    <primary>decimal</primary>
-    <see>numeric</see>
-   </indexterm>
-
-   <indexterm zone="datatype-numeric">
-    <primary>real</primary>
-   </indexterm>
-
-   <indexterm zone="datatype-numeric">
-    <primary>double precision</primary>
-   </indexterm>
-
-   <indexterm>
-    <primary>float4</primary>
-    <see>real</see>
-   </indexterm>
-
-   <indexterm>
-    <primary>float8</primary>
-    <see>double precision</see>
-   </indexterm>
-
-   <indexterm zone="datatype-numeric">
-    <primary>floating point</primary>
-   </indexterm>
-
    <para>
     Numeric types consist of two-, four-, and eight-byte integers,
     four- and eight-byte floating-point numbers, and fixed-precision
@@ -434,6 +376,33 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.122 2003/08/09 22:50:21 t
    <sect2 id="datatype-int">
     <title>Integer Types</title>
 
+    <indexterm zone="datatype-int">
+     <primary>integer</primary>
+    </indexterm>
+
+    <indexterm zone="datatype-int">
+     <primary>smallint</primary>
+    </indexterm>
+
+    <indexterm zone="datatype-int">
+     <primary>bigint</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>int4</primary>
+     <see>integer</see>
+    </indexterm>
+
+    <indexterm>
+     <primary>int2</primary>
+     <see>smallint</see>
+    </indexterm>
+
+    <indexterm>
+     <primary>int8</primary>
+     <see>bigint</see>
+    </indexterm>
+
     <para>
      The types <type>smallint</type>, <type>integer</type>, and
      <type>bigint</type> store whole numbers, that is, numbers without
@@ -495,6 +464,15 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.122 2003/08/09 22:50:21 t
    <sect2 id="datatype-numeric-decimal">
     <title>Arbitrary Precision Numbers</title>
 
+    <indexterm zone="datatype-numeric-decimal">
+     <primary>numeric (data type)</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>decimal</primary>
+     <see>numeric</see>
+    </indexterm>
+
     <para>
      The type <type>numeric</type> can store numbers with up to 1000
      digits of precision and perform calculations exactly. It is
@@ -562,6 +540,28 @@ NUMERIC
    <sect2 id="datatype-float">
     <title>Floating-Point Types</title>
 
+    <indexterm zone="datatype-float">
+     <primary>real</primary>
+    </indexterm>
+
+    <indexterm zone="datatype-float">
+     <primary>double precision</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>float4</primary>
+     <see>real</see>
+    </indexterm>
+
+    <indexterm>
+     <primary>float8</primary>
+     <see>double precision</see>
+    </indexterm>
+
+    <indexterm zone="datatype-float">
+     <primary>floating point</primary>
+    </indexterm>
+
     <para>
      The data types <type>real</type> and <type>double
      precision</type> are inexact, variable-precision numeric types.
@@ -675,7 +675,7 @@ NUMERIC
     </indexterm>
 
     <indexterm>
-     <primary>sequences</primary>
+     <primary>sequence</primary>
      <secondary>and serial type</secondary>
     </indexterm>
 
@@ -807,18 +807,33 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
    <title>Character Types</title>
 
    <indexterm zone="datatype-character">
-    <primary>character strings</primary>
+    <primary>character string</primary>
     <secondary>data types</secondary>
    </indexterm>
 
    <indexterm>
-    <primary>strings</primary>
-    <see>character strings</see>
+    <primary>string</primary>
+    <see>character string</see>
    </indexterm>
 
-   <indexterm>
+   <indexterm zone="datatype-character">
+    <primary>character</primary>
+   </indexterm>
+
+   <indexterm zone="datatype-character">
+    <primary>character varying</primary>
+   </indexterm>
+
+   <indexterm zone="datatype-character">
     <primary>text</primary>
-    <see>character strings</see>
+   </indexterm>
+
+   <indexterm zone="datatype-character">
+    <primary>char</primary>
+   </indexterm>
+
+   <indexterm zone="datatype-character">
+    <primary>varchar</primary>
    </indexterm>
 
     <table id="datatype-character-table">
@@ -1020,6 +1035,15 @@ SELECT b, char_length(b) FROM test2;
 
  <sect1 id="datatype-binary">
   <title>Binary Data Types</title>
+
+  <indexterm zone="datatype-binary">
+   <primary>binary data</primary>
+  </indexterm>
+
+  <indexterm zone="datatype-binary">
+   <primary>bytea</primary>
+  </indexterm>
+
    <para>
     The <type>bytea</type> data type allows storage of binary strings;
     see <xref linkend="datatype-binary-table">.
@@ -1210,6 +1234,34 @@ SELECT b, char_length(b) FROM test2;
   <sect1 id="datatype-datetime">
    <title>Date/Time Types</title>
 
+   <indexterm zone="datatype-datetime">
+    <primary>date</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>time</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>time without time zone</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>time with time zone</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>timestamp</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>timestamp with time zone</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>timestamp without time zone</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>interval</primary>
+   </indexterm>
+   <indexterm zone="datatype-datetime">
+    <primary>time span</primary>
+   </indexterm>
+
    <para>
     <productname>PostgreSQL</productname> supports the full set of
     <acronym>SQL</acronym> date and time types, shown in <xref
@@ -1387,7 +1439,6 @@ SELECT b, char_length(b) FROM test2;
 
     <indexterm>
      <primary>date</primary>
-     <secondary>data type</secondary>
     </indexterm>
  
     <para>
@@ -1461,15 +1512,12 @@ SELECT b, char_length(b) FROM test2;
 
      <indexterm>
       <primary>time</primary>
-      <secondary>data type</secondary>
      </indexterm>
      <indexterm>
       <primary>time without time zone</primary>
-      <secondary>time</secondary>
      </indexterm>
      <indexterm>
       <primary>time with time zone</primary>
-      <secondary>data type</secondary>
      </indexterm>
 
      <para>
@@ -1587,17 +1635,14 @@ SELECT b, char_length(b) FROM test2;
 
     <indexterm>
      <primary>timestamp</primary>
-     <secondary>data type</secondary>
     </indexterm>
 
     <indexterm>
      <primary>timestamp with time zone</primary>
-     <secondary>data type</secondary>
     </indexterm>
 
     <indexterm>
      <primary>timestamp without time zone</primary>
-     <secondary>data type</secondary>
     </indexterm>
 
      <para>
@@ -1797,13 +1842,13 @@ January 8 04:05:06 1999 PST
     <indexterm>
      <primary>date</primary>
      <secondary>output format</secondary>
-     <seealso>Formatting</seealso>
+     <seealso>formatting</seealso>
     </indexterm>
 
     <indexterm>
      <primary>time</primary>
      <secondary>output format</secondary>
-     <seealso>Formatting</seealso>
+     <seealso>formatting</seealso>
     </indexterm>
 
     <para>
@@ -1924,7 +1969,7 @@ January 8 04:05:06 1999 PST
     <title>Time Zones</title>
 
     <indexterm zone="datatype-timezones">
-     <primary>time zones</primary>
+     <primary>time zone</primary>
     </indexterm>
 
    <para>
@@ -2265,7 +2310,11 @@ SELECT * FROM test1 WHERE a;
     <title>Line Segments</title>
 
     <indexterm>
-     <primary>line</primary>
+     <primary>lseg</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>line segment</primary>
     </indexterm>
 
     <para>
@@ -2293,6 +2342,10 @@ SELECT * FROM test1 WHERE a;
      <primary>box (data type)</primary>
     </indexterm>
 
+    <indexterm>
+     <primary>rectangle</primary>
+    </indexterm>
+
     <para>
      Boxes are represented by pairs of points that are opposite
      corners of the box.
@@ -2431,7 +2484,7 @@ SELECT * FROM test1 WHERE a;
 
    <indexterm zone="datatype-net-types">
     <primary>network</primary>
-    <secondary>addresses</secondary>
+    <secondary>data types</secondary>
    </indexterm>
 
    <para>
@@ -2708,7 +2761,7 @@ SELECT * FROM test1 WHERE a;
    <title>Bit String Types</title>
 
    <indexterm zone="datatype-bit">
-    <primary>bit strings</primary>
+    <primary>bit string</primary>
     <secondary>data type</secondary>
    </indexterm>
 
@@ -3045,11 +3098,6 @@ SELECT * FROM test;
       </thead>
 
       <tbody>
-       <row>
-       <entry><type>record</></entry>
-       <entry>Identifies a function returning an unspecified row type.</entry>
-       </row>
-
        <row>
        <entry><type>any</></entry>
        <entry>Indicates that a function accepts any input data type whatever.</entry>
@@ -3058,23 +3106,24 @@ SELECT * FROM test;
        <row>
        <entry><type>anyarray</></entry>
        <entry>Indicates that a function accepts any array data type
-       (see <xref linkend="types-polymorphic">).</entry>
+       (see <xref linkend="extend-types-polymorphic">).</entry>
        </row>
 
        <row>
        <entry><type>anyelement</></entry>
        <entry>Indicates that a function accepts any data type
-       (see <xref linkend="types-polymorphic">).</entry>
+       (see <xref linkend="extend-types-polymorphic">).</entry>
        </row>
 
        <row>
-       <entry><type>void</></entry>
-       <entry>Indicates that a function returns no value.</entry>
+       <entry><type>cstring</></entry>
+       <entry>Indicates that a function accepts or returns a null-terminated C string.</entry>
        </row>
 
        <row>
-       <entry><type>trigger</></entry>
-       <entry>A trigger function is declared to return <type>trigger.</></entry>
+       <entry><type>internal</></entry>
+       <entry>Indicates that a function accepts or returns a server-internal
+       data type.</entry>
        </row>
 
        <row>
@@ -3083,14 +3132,18 @@ SELECT * FROM test;
        </row>
 
        <row>
-       <entry><type>cstring</></entry>
-       <entry>Indicates that a function accepts or returns a null-terminated C string.</entry>
+       <entry><type>record</></entry>
+       <entry>Identifies a function returning an unspecified row type.</entry>
        </row>
 
        <row>
-       <entry><type>internal</></entry>
-       <entry>Indicates that a function accepts or returns a server-internal
-       data type.</entry>
+       <entry><type>trigger</></entry>
+       <entry>A trigger function is declared to return <type>trigger.</></entry>
+       </row>
+
+       <row>
+       <entry><type>void</></entry>
+       <entry>Indicates that a function returns no value.</entry>
        </row>
 
        <row>
index c205ee9c31448cfb8fdcaf68849e3c5b39804328..9c97f633898ba5c455756831cccac99df38fb846 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32.2.1 2003/09/07 04:36:41 momjian Exp $
 -->
 
  <appendix id="datetime-appendix">
@@ -364,7 +364,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tg
    </para>
 
    <indexterm>
-    <primary>time zones</primary>
+    <primary>time zone</primary>
+    <secondary>abbreviations</secondary>
    </indexterm>
 
    <para>
@@ -536,18 +537,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tg
        <entry>+07:00</entry>
        <entry>Christmas (Island) Time</entry>
        </row>
-<!--
-       Conflicts with China Coastal Time
-       <row>
-       <entry>CCT</entry>
-       <entry>+06:30</entry>
-       <entry>Cocos Island Time</entry>
-       </row>
--->
        <row>
        <entry>MMT</entry>
        <entry>+06:30</entry>
-       <entry>Myannar Time</entry>
+       <entry>Myanmar Time</entry>
        </row>
        <row>
        <entry>ALMT</entry>
@@ -759,6 +752,21 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tg
        <entry>-01:00</entry>
        <entry>West Africa Time</entry>
        </row>
+       <row>
+       <entry>FNST</entry>
+       <entry>-01:00</entry>
+       <entry>Fernando de Noronha Summer Time</entry>
+       </row>
+       <row>
+       <entry>FNT</entry>
+       <entry>-02:00</entry>
+       <entry>Fernando de Noronha Time</entry>
+       </row>
+       <row>
+       <entry>BRST</entry>
+       <entry>-02:00</entry>
+       <entry>Brasilia Summer Time</entry>
+       </row>
        <row>
        <entry>NDT</entry>
        <entry>-02:30</entry>
@@ -774,6 +782,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tg
        <entry>-03:00</entry>
        <entry>(unknown)</entry>
        </row>
+       <row>
+       <entry>BRT</entry>
+       <entry>-03:00</entry>
+       <entry>Brasilia Time</entry>
+       </row>
        <row>
        <entry>NFT</entry>
        <entry>-03:30</entry>
@@ -794,11 +807,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tg
        <entry>-04:00</entry>
        <entry>Atlantic/Porto Acre Summer Time</entry>
        </row>
-       <row>
-       <entry>ACT</entry>
-       <entry>-05:00</entry>
-       <entry>Atlantic/Porto Acre Standard Time</entry>
-       </row>
        <row>
        <entry>EDT</entry>
        <entry>-04:00</entry>
@@ -811,6 +819,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.32 2003/07/29 00:03:17 tg
       <entry>GMT +4 hours</entry>
       </row>
        -->
+       <row>
+       <entry>ACT</entry>
+       <entry>-05:00</entry>
+       <entry>Atlantic/Porto Acre Standard Time</entry>
+       </row>
        <row>
        <entry>CDT</entry>
        <entry>-05:00</entry>
index fc6cdc331c2d33f545b5a04316b6c98edfb12264..183a8f790d36a2218c152a84792315b07729e05c 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.17 2003/08/14 23:13:27 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.17.2.1 2003/09/07 04:36:41 momjian Exp $ -->
 
 <chapter id="ddl">
  <title>Data Definition</title>
  <sect1 id="ddl-basics">
   <title>Table Basics</title>
 
+  <indexterm zone="ddl-basics">
+   <primary>table</primary>
+  </indexterm>
+
+  <indexterm>
+   <primary>row</primary>
+  </indexterm>
+
+  <indexterm>
+   <primary>column</primary>
+  </indexterm>
+
   <para>
    A table in a relational database is much like a table on paper: It
    consists of rows and columns.  The number and order of the columns
    containing both date and time.
   </para>
 
+  <indexterm>
+   <primary>table</primary>
+   <secondary>creating</secondary>
+  </indexterm>
+
   <para>
    To create a table, you use the aptly named <literal>CREATE
    TABLE</literal> command.  In this command you specify at least a
@@ -114,6 +131,11 @@ CREATE TABLE products (
    highly unusual and often a questionable design.
   </para>
 
+  <indexterm>
+   <primary>table</primary>
+   <secondary>removing</secondary>
+  </indexterm>
+
   <para>
    If you no longer need a table, you can remove it using the
    <command>DROP TABLE</command> command.  For example:
@@ -156,8 +178,8 @@ DROP TABLE products;
   </para>
 
   <indexterm>
-   <primary>columns</primary>
-   <secondary>system columns</secondary>
+   <primary>column</primary>
+   <secondary>system column</secondary>
   </indexterm>
 
   <variablelist>
@@ -167,6 +189,7 @@ DROP TABLE products;
      <para>
       <indexterm>
        <primary>OID</primary>
+       <secondary>column</secondary>
       </indexterm>
       The object identifier (object ID) of a row.  This is a serial
       number that is automatically added by
@@ -182,6 +205,10 @@ DROP TABLE products;
    <varlistentry>
     <term><structfield>tableoid</></term>
     <listitem>
+     <indexterm>
+      <primary>tableoid</primary>
+     </indexterm>
+
      <para>
       The OID of the table containing this row.  This column is
       particularly handy for queries that select from inheritance
@@ -197,6 +224,10 @@ DROP TABLE products;
    <varlistentry>
     <term><structfield>xmin</></term>
     <listitem>
+     <indexterm>
+      <primary>xmin</primary>
+     </indexterm>
+
      <para>
       The identity (transaction ID) of the inserting transaction for
       this tuple.  (Note: In this context, a tuple is an individual
@@ -209,6 +240,10 @@ DROP TABLE products;
    <varlistentry>
     <term><structfield>cmin</></term>
     <listitem>
+     <indexterm>
+      <primary>cmin</primary>
+     </indexterm>
+
      <para>
       The command identifier (starting at zero) within the inserting
       transaction.
@@ -219,6 +254,10 @@ DROP TABLE products;
    <varlistentry>
     <term><structfield>xmax</></term>
     <listitem>
+     <indexterm>
+      <primary>xmax</primary>
+     </indexterm>
+
      <para>
       The identity (transaction ID) of the deleting transaction, or
       zero for an undeleted tuple.  It is possible for this column to
@@ -232,6 +271,10 @@ DROP TABLE products;
    <varlistentry>
     <term><structfield>cmax</></term>
     <listitem>
+     <indexterm>
+      <primary>cmax</primary>
+     </indexterm>
+
      <para>
       The command identifier within the deleting transaction, or zero.
      </para>
@@ -241,6 +284,10 @@ DROP TABLE products;
    <varlistentry>
     <term><structfield>ctid</></term>
     <listitem>
+     <indexterm>
+      <primary>ctid</primary>
+     </indexterm>
+
      <para>
       The physical location of the tuple within its table.  Note that
       although the <structfield>ctid</structfield> can be used to
@@ -292,6 +339,10 @@ DROP TABLE products;
  <sect1 id="ddl-default">
   <title>Default Values</title>
 
+  <indexterm zone="ddl-default">
+   <primary>default value</primary>
+  </indexterm>
+
   <para>
    A column can be assigned a default value.  When a new row is
    created and no values are specified for some of the columns, the
@@ -302,6 +353,7 @@ DROP TABLE products;
   </para>
 
   <para>
+   <indexterm><primary>null value</primary><secondary>default value</secondary></indexterm>
    If no default value is declared explicitly, the null value is the
    default value.  This usually makes sense because a null value can
    be thought to represent unknown data.
@@ -329,6 +381,10 @@ CREATE TABLE products (
  <sect1 id="ddl-constraints">
   <title>Constraints</title>
 
+  <indexterm zone="ddl-constraints">
+   <primary>constraint</primary>
+  </indexterm>
+
   <para>
    Data types are a way to limit the kind of data that can be stored
    in a table.  For many applications, however, the constraint they
@@ -351,6 +407,15 @@ CREATE TABLE products (
   <sect2>
    <title>Check Constraints</title>
 
+   <indexterm>
+    <primary>check constraint</primary>
+   </indexterm>
+
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>check</secondary>
+   </indexterm>
+
    <para>
     A check constraint is the most generic constraint type.  It allows
     you to specify that the value in a certain column must satisfy an
@@ -375,6 +440,11 @@ CREATE TABLE products (
     would not make too much sense.
    </para>
 
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>name</secondary>
+   </indexterm>
+
    <para>
     You can also give the constraint a separate name.  This clarifies
     error messages and allows you to refer to the constraint when you
@@ -444,6 +514,11 @@ CREATE TABLE products (
     It's a matter of taste.
    </para>
 
+   <indexterm>
+    <primary>null value</primary>
+    <secondary sortas="check constraints">with check constraints</secondary>
+   </indexterm>
+
    <para>
     It should be noted that a check constraint is satisfied if the
     check expression evaluates to true or the null value.  Since most
@@ -457,6 +532,15 @@ CREATE TABLE products (
   <sect2>
    <title>Not-Null Constraints</title>
 
+   <indexterm>
+    <primary>not-null constraint</primary>
+   </indexterm>
+
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>NOT NULL</secondary>
+   </indexterm>
+
    <para>
     A not-null constraint simply specifies that a column must not
     assume the null value.  A syntax example:
@@ -526,6 +610,15 @@ CREATE TABLE products (
   <sect2>
    <title>Unique Constraints</title>
 
+   <indexterm>
+    <primary>unique constraint</primary>
+   </indexterm>
+
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>unique</secondary>
+   </indexterm>
+
    <para>
     Unique constraints ensure that the data contained in a column or a
     group of columns is unique with respect to all the rows in the
@@ -573,6 +666,11 @@ CREATE TABLE products (
 </programlisting>
    </para>
 
+   <indexterm>
+    <primary>null value</primary>
+    <secondary sortas="unique constraints">with unique constraints</secondary>
+   </indexterm>
+
    <para>
     In general, a unique constraint is violated when there are (at
     least) two rows in the table where the values of each of the
@@ -591,6 +689,15 @@ CREATE TABLE products (
   <sect2>
    <title>Primary Keys</title>
 
+   <indexterm>
+    <primary>primary key</primary>
+   </indexterm>
+
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>primary key</secondary>
+   </indexterm>
+
    <para>
     Technically, a primary key constraint is simply a combination of a
     unique constraint and a not-null constraint.  So, the following
@@ -649,6 +756,19 @@ CREATE TABLE example (
   <sect2 id="ddl-constraints-fk">
    <title>Foreign Keys</title>
 
+   <indexterm>
+    <primary>foreign key</primary>
+   </indexterm>
+
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>foreign key</secondary>
+   </indexterm>
+
+   <indexterm>
+    <primary>referential integrity</primary>
+   </indexterm>
+
    <para>
     A foreign key constraint specifies that the values in a column (or
     a group of columns) must match the values appearing in some row
@@ -749,6 +869,16 @@ CREATE TABLE order_items (
     the last table.
    </para>
 
+   <indexterm>
+    <primary>CASCADE</primary>
+    <secondary>foreign key action</secondary>
+   </indexterm>
+
+   <indexterm>
+    <primary>RESTRICT</primary>
+    <secondary>foreign key action</secondary>
+   </indexterm>
+
    <para>
     We know that the foreign keys disallow creation of orders that
     do not relate to any products.  But what if a product is removed
@@ -998,6 +1128,11 @@ SET SQL_Inheritance TO OFF;
  <sect1 id="ddl-alter">
   <title>Modifying Tables</title>
 
+  <indexterm zone="ddl-alter">
+   <primary>table</primary>
+   <secondary>modifying</secondary>
+  </indexterm>
+
   <para>
    When you create a table and you realize that you made a mistake, or
    the requirements of the application changed, then you can drop the
@@ -1042,6 +1177,11 @@ SET SQL_Inheritance TO OFF;
   <sect2>
    <title>Adding a Column</title>
 
+   <indexterm>
+    <primary>column</primary>
+    <secondary>adding</secondary>
+   </indexterm>
+
    <para>
     To add a column, use this command:
 <programlisting>
@@ -1070,6 +1210,11 @@ ALTER TABLE products ADD COLUMN description text CHECK (description &lt;&gt; '')
   <sect2>
    <title>Removing a Column</title>
 
+   <indexterm>
+    <primary>column</primary>
+    <secondary>removing</secondary>
+   </indexterm>
+
    <para>
     To remove a column, use this command:
 <programlisting>
@@ -1081,6 +1226,11 @@ ALTER TABLE products DROP COLUMN description;
   <sect2>
    <title>Adding a Constraint</title>
 
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>adding</secondary>
+   </indexterm>
+
    <para>
     To add a constraint, the table constraint syntax is used.  For example:
 <programlisting>
@@ -1104,6 +1254,11 @@ ALTER TABLE products ALTER COLUMN product_no SET NOT NULL;
   <sect2>
    <title>Removing a Constraint</title>
 
+   <indexterm>
+    <primary>constraint</primary>
+    <secondary>removing</secondary>
+   </indexterm>
+
    <para>
     To remove a constraint you need to know its name.  If you gave it
     a name then that's easy.  Otherwise the system assigned a
@@ -1127,6 +1282,11 @@ ALTER TABLE products ALTER COLUMN product_no DROP NOT NULL;
   <sect2>
    <title>Changing the Default</title>
 
+   <indexterm>
+    <primary>default value</primary>
+    <secondary>changing</secondary>
+   </indexterm>
+
    <para>
     To set a new default for a column, use a command like this:
 <programlisting>
@@ -1146,6 +1306,11 @@ ALTER TABLE products ALTER COLUMN price DROP DEFAULT;
   <sect2>
    <title>Renaming a Column</title>
 
+   <indexterm>
+    <primary>column</primary>
+    <secondary>renaming</secondary>
+   </indexterm>
+
    <para>
     To rename a column:
 <programlisting>
@@ -1157,6 +1322,11 @@ ALTER TABLE products RENAME COLUMN product_no TO product_number;
   <sect2>
    <title>Renaming a Table</title>
 
+   <indexterm>
+    <primary>table</primary>
+    <secondary>renaming</secondary>
+   </indexterm>
+
    <para>
     To rename a table:
 <programlisting>
@@ -1169,6 +1339,15 @@ ALTER TABLE products RENAME TO items;
  <sect1 id="ddl-priv">
   <title>Privileges</title>
 
+  <indexterm zone="ddl-priv">
+   <primary>privilege</primary>
+  </indexterm>
+
+  <indexterm>
+   <primary>permission</primary>
+   <see>privilege</see>
+  </indexterm>
+
   <para>
    When you create a database object, you become its owner.  By
    default, only the owner of an object can do anything with the
@@ -1241,12 +1420,8 @@ REVOKE ALL ON accounts FROM PUBLIC;
  <sect1 id="ddl-schemas">
   <title>Schemas</title>
 
-  <indexterm>
-   <primary>schemas</primary>
-  </indexterm>
-
-  <indexterm>
-   <primary>namespaces</primary>
+  <indexterm zone="ddl-schemas">
+   <primary>schema</primary>
   </indexterm>
 
   <para>
@@ -1313,6 +1488,11 @@ REVOKE ALL ON accounts FROM PUBLIC;
   <sect2 id="ddl-schemas-create">
    <title>Creating a Schema</title>
 
+   <indexterm zone="ddl-schemas-create">
+    <primary>schema</primary>
+    <secondary>creating</secondary>
+   </indexterm>
+
    <para>
     To create a separate schema, use the command <literal>CREATE
     SCHEMA</literal>.  Give the schema a name of your choice.  For
@@ -1323,11 +1503,11 @@ CREATE SCHEMA myschema;
    </para>
 
    <indexterm>
-    <primary>qualified names</primary>
+    <primary>qualified name</primary>
    </indexterm>
 
    <indexterm>
-    <primary>names</primary>
+    <primary>name</primary>
     <secondary>qualified</secondary>
    </indexterm>
 
@@ -1359,6 +1539,11 @@ CREATE TABLE myschema.mytable (
     the following chapters.
    </para>
 
+   <indexterm>
+    <primary>schema</primary>
+    <secondary>removing</secondary>
+   </indexterm>
+
    <para>
     To drop a schema if it's empty (all objects in it have been
     dropped), use
@@ -1394,6 +1579,11 @@ CREATE SCHEMA <replaceable>schemaname</replaceable> AUTHORIZATION <replaceable>u
   <sect2 id="ddl-schemas-public">
    <title>The Public Schema</title>
 
+   <indexterm zone="ddl-schemas-public">
+    <primary>schema</primary>
+    <secondary>public</secondary>
+   </indexterm>
+
    <para>
     In the previous sections we created tables without specifying any
     schema names.  By default, such tables (and other objects) are
@@ -1417,11 +1607,11 @@ CREATE TABLE public.products ( ... );
    </indexterm>
 
    <indexterm>
-    <primary>unqualified names</primary>
+    <primary>unqualified name</primary>
    </indexterm>
 
    <indexterm>
-    <primary>names</primary>
+    <primary>name</primary>
     <secondary>unqualified</secondary>
    </indexterm>
 
@@ -1437,6 +1627,11 @@ CREATE TABLE public.products ( ... );
     in other schemas in the database.
    </para>
 
+   <indexterm>
+    <primary>schema</primary>
+    <secondary>current</secondary>
+   </indexterm>
+
    <para>
     The first schema named in the search path is called the current schema.
     Aside from being the first schema searched, it is also the schema in
@@ -1444,6 +1639,10 @@ CREATE TABLE public.products ( ... );
     command does not specify a schema name.
    </para>
 
+   <indexterm>
+    <primary>search_path</primary>
+   </indexterm>
+
    <para>
     To show the current search path, use the following command:
 <programlisting>
@@ -1523,6 +1722,11 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
   <sect2 id="ddl-schemas-priv">
    <title>Schemas and Privileges</title>
 
+   <indexterm zone="ddl-schemas-priv">
+    <primary>privilege</primary>
+    <secondary sortas="schemas">for schemas</secondary>
+   </indexterm>
+
    <para>
     By default, users cannot see the objects in schemas they do not
     own.  To allow that, the owner of the schema needs to grant the
@@ -1550,9 +1754,14 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
    </para>
   </sect2>
 
-  <sect2>
+  <sect2 id="ddl-schemas-catalog">
    <title>The System Catalog Schema</title>
 
+   <indexterm zone="ddl-schemas-catalog">
+    <primary>system catalog</primary>
+    <secondary>schema</secondary>
+   </indexterm>
+
    <para>
     In addition to <literal>public</> and user-created schemas, each
     database contains a <literal>pg_catalog</> schema, which contains
@@ -1701,6 +1910,16 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
  <sect1 id="ddl-depend">
   <title>Dependency Tracking</title>
 
+  <indexterm zone="ddl-depend">
+   <primary>CASCADE</primary>
+   <secondary sortas="DROP">with DROP</secondary>
+  </indexterm>
+
+  <indexterm zone="ddl-depend">
+   <primary>RESTRICT</primary>
+   <secondary sortas="DROP">with DROP</secondary>
+  </indexterm>
+
   <para>
    When you create complex database structures involving many tables
    with foreign key constraints, views, triggers, functions, etc. you
index 3898a2bc1765dc2758427ba2a97b5279ad19dadc..57fb6f208f3583597dc51a5ae0243e613d25a236 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.25 2003/04/10 01:22:44 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.25.2.1 2003/09/07 04:36:41 momjian Exp $
 -->
 
 <sect2 id="dfunc">
@@ -8,9 +8,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.25 2003/04/10 01:22:44 peter
  <para>
   Before you are able to use your
   <productname>PostgreSQL</productname> extension functions written in
-  C, they must be compiled and linked in a special way to produce a file
-  that can be dynamically loaded by the server.  To be
-  precise, a <firstterm>shared library</firstterm> needs to be created.
+  C, they must be compiled and linked in a special way to produce a
+  file that can be dynamically loaded by the server.  To be precise, a
+  <firstterm>shared library</firstterm> needs to be
+  created.<indexterm><primary>shared library</></indexterm>
+
  </para>
 
  <para>
@@ -26,17 +28,18 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.25 2003/04/10 01:22:44 peter
  </para>
 
  <para>
-  <indexterm><primary>PIC</></>
-  Creating shared libraries is generally analogous to linking
-  executables:  first the source files are compiled into object files,
-  then the object files are linked together.  The object files need to
-  be created as <firstterm>position-independent code</firstterm>
-  (<acronym>PIC</acronym>), which conceptually means that they can be
-  placed at an arbitrary location in memory when they are loaded by the
-  executable.  (Object files intended for executables are usually not compiled
-  that way.)  The command to link a shared library contains special
-  flags to distinguish it from linking an executable. --- At least
-  this is the theory.  On some systems the practice is much uglier.
+  <indexterm><primary>PIC</></> Creating shared libraries is generally
+  analogous to linking executables: first the source files are
+  compiled into object files, then the object files are linked
+  together.  The object files need to be created as
+  <firstterm>position-independent code</firstterm>
+  (<acronym>PIC</acronym>),<indexterm><primary>PIC</></> which
+  conceptually means that they can be placed at an arbitrary location
+  in memory when they are loaded by the executable.  (Object files
+  intended for executables are usually not compiled that way.)  The
+  command to link a shared library contains special flags to
+  distinguish it from linking an executable. --- At least this is the
+  theory.  On some systems the practice is much uglier.
  </para>
 
  <para>
@@ -57,7 +60,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.25 2003/04/10 01:22:44 peter
   <variablelist>
    <varlistentry>
     <term><systemitem class="osname">BSD/OS</></term>
-    <indexterm><primary>BSD/OS</></>
+    <indexterm><primary>BSD/OS</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is
@@ -75,7 +78,7 @@ ld -shared -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">FreeBSD</></term>
-    <indexterm><primary>FreeBSD</></>
+    <indexterm><primary>FreeBSD</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is
@@ -93,7 +96,7 @@ gcc -shared -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">HP-UX</></term>
-    <indexterm><primary>HP-UX</></>
+    <indexterm><primary>HP-UX</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag of the system compiler to create
@@ -120,7 +123,7 @@ ld -b -o foo.sl foo.o
 
    <varlistentry>
     <term><systemitem class="osname">IRIX</></term>
-    <indexterm><primary>IRIX</></>
+    <indexterm><primary>IRIX</><secondary>shared library</></>
     <listitem>
      <para>
       <acronym>PIC</acronym> is the default, no special compiler
@@ -136,7 +139,7 @@ ld -shared -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">Linux</></term>
-    <indexterm><primary>Linux</></>
+    <indexterm><primary>Linux</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is
@@ -155,7 +158,7 @@ cc -shared -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">MacOS X</></term>
-    <indexterm><primary>MacOS X</></>
+    <indexterm><primary>MacOS X</><secondary>shared library</></>
     <listitem>
      <para>
       Here is an example.  It assumes the developer tools are installed.
@@ -169,7 +172,7 @@ cc -bundle -flat_namespace -undefined suppress -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">NetBSD</></term>
-    <indexterm><primary>NetBSD</></>
+    <indexterm><primary>NetBSD</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is
@@ -187,7 +190,7 @@ gcc -shared -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">OpenBSD</></term>
-    <indexterm><primary>OpenBSD</></>
+    <indexterm><primary>OpenBSD</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is
@@ -203,7 +206,7 @@ ld -Bshareable -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">Solaris</></term>
-    <indexterm><primary>Solaris</></>
+    <indexterm><primary>Solaris</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is
@@ -227,7 +230,7 @@ gcc -G -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">Tru64 UNIX</></term>   
-    <indexterm><primary>Tru64 UNIX</></>
+    <indexterm><primary>Tru64 UNIX</><secondary>shared library</></>
     <indexterm><primary>Digital UNIX</><see>Tru64 UNIX</></>
     <listitem>
      <para>
@@ -246,7 +249,7 @@ ld -shared -expect_unresolved '*' -o foo.so foo.o
 
    <varlistentry>
     <term><systemitem class="osname">UnixWare</></term>
-    <indexterm><primary>UnixWare</></>
+    <indexterm><primary>UnixWare</><secondary>shared library</></>
     <listitem>
      <para>
       The compiler flag to create <acronym>PIC</acronym> is <option>-K
index 6476fcf14ab52066a6bb4835ef190fd9afec29f2..4f9343cce98df8be8f0ae2a0bc3647cfbab66049 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/dml.sgml,v 1.5 2003/08/10 01:20:34 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/dml.sgml,v 1.5.2.1 2003/09/07 04:36:41 momjian Exp $ -->
 
 <chapter id="dml">
  <title>Data Manipulation</title>
  <sect1 id="dml-insert">
   <title>Inserting Data</title>
 
+  <indexterm zone="dml-insert">
+   <primary>inserting</primary>
+  </indexterm>
+
+  <indexterm zone="dml-insert">
+   <primary>INSERT</primary>
+  </indexterm>
+
   <para>
    When a table is created, it contains no data.  The first thing to
    do before a database can be of much use is to insert data.  Data is
@@ -98,6 +106,14 @@ INSERT INTO products DEFAULT VALUES;
  <sect1 id="dml-update">
   <title>Updating Data</title>
 
+  <indexterm zone="dml-update">
+   <primary>updating</primary>
+  </indexterm>
+
+  <indexterm zone="dml-update">
+   <primary>UPDATE</primary>
+  </indexterm>
+
   <para>
    The modification of data that is already in the database is
    referred to as updating.  You can update individual rows, all the
@@ -182,6 +198,14 @@ UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
  <sect1 id="dml-delete">
   <title>Deleting Data</title>
 
+  <indexterm zone="dml-delete">
+   <primary>deleting</primary>
+  </indexterm>
+
+  <indexterm zone="dml-delete">
+   <primary>DELETE</primary>
+  </indexterm>
+
   <para>
    So far we have explained how to add data to tables and how to
    change data.  What remains is to discuss how to remove data that is
index c26b10ab0e361d96cf05f60a5cd390328bfdaf4a..4c9fb206290d58cd5264a02f1b3971eab8b3fe32 100644 (file)
@@ -1,11 +1,13 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.48 2003/08/07 04:17:21 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.48.2.1 2003/09/07 04:36:41 momjian Exp $
 -->
 
 <chapter id="ecpg">
  <title><application>ECPG</application> - Embedded <acronym>SQL</acronym> in C</title>
 
  <indexterm zone="ecpg"><primary>embedded SQL</primary><secondary>in C</secondary></indexterm>
+ <indexterm zone="ecpg"><primary>C</primary></indexterm>
+ <indexterm zone="ecpg"><primary>ECPG</primary></indexterm>
 
  <para>
   This chapter describes the embedded <acronym>SQL</acronym> package
index 7d0f65f0679dd21f2e3b4d75e4ab03273faa6bf6..f8e0ec08ac3634e4afb8c99e4c36a185674ce2f5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.23 2003/08/09 22:50:21 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.23.2.1 2003/09/07 04:36:41 momjian Exp $
 -->
 
  <chapter id="extend">
@@ -80,16 +80,25 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.23 2003/08/09 22:50:21 tgl
    </para>
   </sect1>
 
-  <sect1 id="type-system">
+  <sect1 id="extend-type-system">
    <title>The <productname>PostgreSQL</productname> Type System</title>
 
-   <indexterm zone="type-system">
-    <primary>extending SQL</primary>
-    <secondary>types</secondary>
+   <indexterm zone="extend-type-system">
+    <primary>base type</primary>
+   </indexterm>
+
+   <indexterm zone="extend-type-system">
+    <primary>data type</primary>
+    <secondary>base</secondary>
+   </indexterm>
+
+   <indexterm zone="extend-type-system">
+    <primary>composite type</primary>
    </indexterm>
 
-   <indexterm zone="type-system">
-    <primary>data types</primary>
+   <indexterm zone="extend-type-system">
+    <primary>data type</primary>
+    <secondary>composite</secondary>
    </indexterm>
 
    <para>
@@ -138,15 +147,25 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.23 2003/08/09 22:50:21 tgl
     pseudo-types.
    </para>
 
-   <sect2 id="types-polymorphic">
+   <sect2 id="extend-types-polymorphic">
     <title>Polymorphic Types and Functions</title>
 
-   <indexterm>
-    <primary>polymorphic types</primary>
+   <indexterm zone="extend-types-polymorphic">
+    <primary>polymorphic type</primary>
+   </indexterm>
+
+   <indexterm zone="extend-types-polymorphic">
+    <primary>polymorphic function</primary>
+   </indexterm>
+
+   <indexterm zone="extend-types-polymorphic">
+    <primary>type</primary>
+    <secondary>polymorphic</secondary>
    </indexterm>
 
-   <indexterm>
-    <primary>polymorphic functions</primary>
+   <indexterm zone="extend-types-polymorphic">
+    <primary>function</primary>
+    <secondary>polymorphic</secondary>
    </indexterm>
 
     <para>
index 4ba2bd9e51af9f065a513be743aa18f03c2e9091..888220d8df10dde97985ceacf3dfaff8a49b7e7e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/filelist.sgml,v 1.29 2003/05/18 20:55:56 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/filelist.sgml,v 1.29.2.1 2003/09/07 04:36:41 momjian Exp $ -->
 
 <!entity history    SYSTEM "history.sgml">
 <!entity info       SYSTEM "info.sgml">
@@ -68,7 +68,6 @@
 <!entity libpgeasy  SYSTEM "libpgeasy.sgml">
 <!entity libpq      SYSTEM "libpq.sgml">
 <!entity libpgtcl   SYSTEM "libpgtcl.sgml">
-<!entity pygresql   SYSTEM "pygresql.sgml">
 <!entity lobj       SYSTEM "lobj.sgml">
 <!entity odbc       SYSTEM "odbc.sgml">
 <!entity rules      SYSTEM "rules.sgml">
index 6729dc677e8b09633fc6928153c9e68de556d60d..59dd23c2efad9b4eec0ee318b1239d5678a32616 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.166 2003/08/10 01:20:34 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.166.2.1 2003/09/07 04:36:41 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -7,11 +7,11 @@ PostgreSQL documentation
   <title>Functions and Operators</title>
 
   <indexterm zone="functions">
-   <primary>functions</primary>
+   <primary>function</primary>
   </indexterm>
 
   <indexterm zone="functions">
-   <primary>operators</primary>
+   <primary>operator</primary>
   </indexterm>
 
   <para>
@@ -40,7 +40,7 @@ PostgreSQL documentation
    <title>Logical Operators</title>
 
    <indexterm zone="functions-logical">
-    <primary>operators</primary>
+    <primary>operator</primary>
     <secondary>logical</secondary>
    </indexterm>
 
@@ -54,18 +54,27 @@ PostgreSQL documentation
     The usual logical operators are available:
 
     <indexterm>
-     <primary>and</primary>
-     <secondary>operator</secondary>
+     <primary>AND (operator)</primary>
     </indexterm>
 
     <indexterm>
-     <primary>or</primary>
-     <secondary>operator</secondary>
+     <primary>OR (operator)</primary>
     </indexterm>
 
     <indexterm>
-     <primary>not</primary>
-     <secondary>operator</secondary>
+     <primary>NOT (operator)</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>conjunction</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>disjunction</primary>
+    </indexterm>
+
+    <indexterm>
+     <primary>negation</primary>
     </indexterm>
 
     <simplelist>
@@ -252,7 +261,7 @@ PostgreSQL documentation
      <primary>between</primary>
     </indexterm>
     In addition to the comparison operators, the special
-    <token>BETWEEN</token> construct is available.
+    <token>BETWEEN</token> construct is available.<indexterm><primary>BETWEEN</primary></indexterm>
 <synopsis>
 <replaceable>a</replaceable> BETWEEN <replaceable>x</replaceable> AND <replaceable>y</replaceable>
 </synopsis>
@@ -284,6 +293,7 @@ PostgreSQL documentation
 <replaceable>expression</replaceable> ISNULL
 <replaceable>expression</replaceable> NOTNULL
 </synopsis>
+    <indexterm><primary>null value</primary><secondary>comparing</secondary></indexterm>
    </para>
 
    <para>
@@ -847,7 +857,7 @@ PostgreSQL documentation
        <entry>
         String concatenation
         <indexterm>
-         <primary>character strings</primary>
+         <primary>character string</primary>
          <secondary>concatenation</secondary>
         </indexterm>
        </entry>
@@ -869,12 +879,12 @@ PostgreSQL documentation
        <entry>
         Number of characters in string
         <indexterm>
-         <primary>character strings</primary>
+         <primary>character string</primary>
          <secondary>length</secondary>
         </indexterm>
         <indexterm>
          <primary>length</primary>
-         <secondary>character strings</secondary>
+         <secondary sortas="character string">of a character string</secondary>
          <see>character strings, length</see>
         </indexterm>
        </entry>
@@ -1110,12 +1120,12 @@ PostgreSQL documentation
        <entry>
         Number of characters in string
         <indexterm>
-         <primary>character strings</primary>
+         <primary>character string</primary>
          <secondary>length</secondary>
         </indexterm>
         <indexterm>
          <primary>length</primary>
-         <secondary>character strings</secondary>
+         <secondary sortas="character string">of a character string</secondary>
          <see>character strings, length</see>
         </indexterm>
        </entry>
@@ -1174,7 +1184,7 @@ PostgreSQL documentation
       </row>
 
       <row>
-       <entry><literal><function>quote_ident</function>(<parameter>string</parameter> text)</literal></entry>
+       <entry><literal><function>quote_ident</function>(<parameter>string</parameter> text)</literal><indexterm><primary>quote_ident</></></entry>
        <entry><type>text</type></entry>
        <entry>
         Return the given string suitably quoted to be used as an identifier
@@ -1188,7 +1198,7 @@ PostgreSQL documentation
       </row>
 
       <row>
-       <entry><literal><function>quote_literal</function>(<parameter>string</parameter> text)</literal></entry>
+       <entry><literal><function>quote_literal</function>(<parameter>string</parameter> text)</literal><indexterm><primary>quote_literal</></></entry>
        <entry><type>text</type></entry>
        <entry>
         Return the given string suitably quoted to be used as a string literal
@@ -2055,6 +2065,11 @@ PostgreSQL documentation
   <sect1 id="functions-binarystring">
    <title>Binary String Functions and Operators</title>
 
+   <indexterm zone="functions-binarystring">
+    <primary>binary data</primary>
+    <secondary>functions</secondary>
+   </indexterm>
+
    <para>
     This section describes functions and operators for examining and
     manipulating values of type <type>bytea</type>.
@@ -2092,7 +2107,7 @@ PostgreSQL documentation
        <entry>
         String concatenation
         <indexterm>
-         <primary>binary strings</primary>
+         <primary>binary string</primary>
          <secondary>concatenation</secondary>
         </indexterm>
        </entry>
@@ -2243,12 +2258,12 @@ PostgreSQL documentation
       <entry>
        Length of binary string
        <indexterm>
-        <primary>binary strings</primary>
+        <primary>binary string</primary>
        <secondary>length</secondary>
        </indexterm>
        <indexterm>
         <primary>length</primary>
-       <secondary>binary strings</secondary>
+       <secondary sortas="binary string">of a binary string</secondary>
        <see>binary strings, length</see>
        </indexterm>
       </entry>
@@ -2321,8 +2336,8 @@ PostgreSQL documentation
   <sect2 id="functions-like">
    <title><function>LIKE</function></title>
 
-   <indexterm>
-    <primary>like</primary>
+   <indexterm zone="functions-like">
+    <primary>LIKE</primary>
    </indexterm>
 
 <synopsis>
@@ -2420,12 +2435,12 @@ PostgreSQL documentation
      Regular Expressions</title>
 
    <indexterm zone="functions-sql99-regexp">
-    <primary>regular expressions</primary>
+    <primary>regular expression</primary>
     <!-- <seealso>pattern matching</seealso> breaks index build -->
    </indexterm>
 
    <indexterm>
-    <primary>similar to</primary>
+    <primary>SIMILAR TO</primary>
    </indexterm>
 
    <indexterm>
@@ -2547,7 +2562,7 @@ substring('foobar' from '#"o_b#"%' for '#')    <lineannotation>NULL</lineannotat
    <title><acronym>POSIX</acronym> Regular Expressions</title>
 
    <indexterm zone="functions-posix-regexp">
-    <primary>regular expressions</primary>
+    <primary>regular expression</primary>
     <seealso>pattern matching</seealso>
    </indexterm>
 
@@ -3794,6 +3809,10 @@ substring('foobar' from 'o(.)b')   <lineannotation>o</lineannotation>
     <primary>formatting</primary>
    </indexterm>
 
+   <indexterm zone="functions-formatting">
+    <primary>to_char</primary>
+   </indexterm>
+
    <para>
     The <productname>PostgreSQL</productname> formatting functions
     provide a powerful set of tools for converting various data types
@@ -3870,6 +3889,11 @@ substring('foobar' from 'o(.)b')   <lineannotation>o</lineannotation>
      </tgroup>
     </table>
 
+   <para>
+    Warning. <literal><function>to_char</function>(<type>interval</type>, <type>text</type>)</literal> 
+    is deprecated and should not be used in newly-written code. Will be removed in the next version.
+   </para>
+
    <para>
     In an output template string (for <function>to_char</>), there are certain patterns that are
     recognized and replaced with appropriately-formatted data from the value
@@ -5999,7 +6023,7 @@ SELECT TIMESTAMP 'now';
   <title>Sequence-Manipulation Functions</title>
 
   <indexterm>
-   <primary>sequences</primary>
+   <primary>sequence</primary>
   </indexterm>
   <indexterm>
    <primary>nextval</primary>
@@ -6162,11 +6186,11 @@ SELECT setval('foo', 42, false);    <lineannotation>Next <function>nextval</> wi
   <title>Conditional Expressions</title>
 
   <indexterm>
-   <primary>case</primary>
+   <primary>CASE</primary>
   </indexterm>
 
   <indexterm>
-   <primary>conditionals</primary>
+   <primary>conditional expression</primary>
   </indexterm>
 
   <para>
@@ -6287,8 +6311,12 @@ SELECT a,
   <sect2>
    <title><literal>COALESCE</></title>
 
+  <indexterm>
+   <primary>COALESCE</primary>
+  </indexterm>
+
 <synopsis>
-<function>COALESCE</function>(<replaceable>value</replaceable> <optional>, ...</optional>)
+<function>coalesce</function>(<replaceable>value</replaceable> <optional>, ...</optional>)
 </synopsis>
 
   <para>
@@ -6497,7 +6525,8 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
 
    <indexterm zone="functions-misc">
     <primary>configuration</primary>
-    <secondary>server</secondary>
+    <secondary sortas="server">of the server</secondary>
+    <tertiary>functions</tertiary>
    </indexterm>
 
    <para>
@@ -6534,6 +6563,11 @@ SELECT set_config('show_statement_stats', 'off', false);
 </programlisting>
    </para>
 
+  <indexterm>
+   <primary>privilege</primary>
+   <secondary>querying</secondary>
+  </indexterm>
+
   <para>
    <xref linkend="functions-misc-access-table"> lists functions that
    allow the user to query object access privileges programmatically.
@@ -6966,6 +7000,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
     <primary>col_description</primary>
    </indexterm>
 
+   <indexterm zone="functions-misc">
+    <primary>comment</primary>
+    <secondary sortas="database objects">about database objects</secondary>
+   </indexterm>
+
    <para>
     The function shown in <xref
     linkend="functions-misc-comment-table"> extract comments
@@ -7027,7 +7066,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
 
   <para>
    <xref linkend="array-operators-table"> shows the operators
-   available for the <type>array</type> types.
+   available for <type>array</type> types.
   </para>
 
     <table id="array-operators-table">
@@ -7088,7 +7127,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
        <entry> <literal>||</literal> </entry>
        <entry>array-to-array concatenation</entry>
        <entry><literal>ARRAY[1,2,3] || ARRAY[4,5,6]</literal></entry>
-       <entry><literal>{{1,2,3},{4,5,6}}</literal></entry>
+       <entry><literal>{1,2,3,4,5,6}</literal></entry>
        </row>
 
        <row>
@@ -7115,6 +7154,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
      </tgroup>
     </table>
 
+  <para>
+   See <xref linkend="arrays"> for more details about array operator
+   behavior.
+  </para>
+
   <para>
    <xref linkend="array-functions-table"> shows the functions
    available for use with array types. See <xref linkend="arrays">
@@ -7162,7 +7206,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
      for <literal>NULL</literal> inputs
     </entry>
        <entry><literal>array_cat(ARRAY[1,2,3], ARRAY[4,5,6])</literal></entry>
-       <entry><literal>{{1,2,3},{4,5,6}}</literal></entry>
+       <entry><literal>{1,2,3,4,5,6}</literal></entry>
        </row>
        <row>
        <entry>
@@ -7262,6 +7306,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
  <sect1 id="functions-aggregate">
   <title>Aggregate Functions</title>
 
+  <indexterm zone="functions-aggregate">
+   <primary>aggregate function</primary>
+   <secondary>built-in</secondary>
+  </indexterm>
+
   <para>
    <firstterm>Aggregate functions</firstterm> compute a single result
    value from a set of input values.  <xref
@@ -7290,7 +7339,6 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
       <entry>
        <indexterm>
         <primary>average</primary>
-        <secondary>function</secondary>
        </indexterm>
        <function>avg(<replaceable class="parameter">expression</replaceable>)</function>
       </entry>
@@ -7472,31 +7520,31 @@ SELECT col FROM sometable ORDER BY col ASC LIMIT 1;
   <title>Subquery Expressions</title>
 
   <indexterm>
-   <primary>exists</primary>
+   <primary>EXISTS</primary>
   </indexterm>
 
   <indexterm>
-   <primary>in</primary>
+   <primary>IN</primary>
   </indexterm>
 
   <indexterm>
-   <primary>not in</primary>
+   <primary>NOT IN</primary>
   </indexterm>
 
   <indexterm>
-   <primary>any</primary>
+   <primary>ANY</primary>
   </indexterm>
 
   <indexterm>
-   <primary>all</primary>
+   <primary>ALL</primary>
   </indexterm>
 
   <indexterm>
-   <primary>some</primary>
+   <primary>SOME</primary>
   </indexterm>
 
   <indexterm>
-   <primary>subqueries</primary>
+   <primary>subquery</primary>
   </indexterm>
 
   <para>
@@ -7798,6 +7846,11 @@ SELECT col1 FROM tab1
   <sect2>
    <title>Row-wise Comparison</title>
 
+   <indexterm>
+    <primary>comparison</primary>
+    <secondary>of rows</secondary>
+   </indexterm>
+
 <synopsis>
 (<replaceable>expression</replaceable> <optional>, <replaceable>expression</replaceable> ...</optional>) <replaceable>operator</replaceable> (<replaceable>subquery</replaceable>)
 </synopsis>
index 4e79084e7ec4b57f3ee7a7fb124695e678adf4bf..45166fcdea024d9fd5f6949b01e6c922153fad15 100644 (file)
@@ -1,10 +1,10 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.42 2003/05/28 16:03:55 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.42.2.1 2003/09/07 04:36:41 momjian Exp $ -->
 
 <chapter id="indexes">
  <title id="indexes-title">Indexes</title>
 
  <indexterm zone="indexes">
-  <primary>indexes</primary>
+  <primary>index</primary>
  </indexterm>
 
  <para>
@@ -109,12 +109,12 @@ CREATE INDEX test1_id_index ON test1 (id);
    B-tree, R-tree, GiST, and Hash.  Each index type is more appropriate for
    a particular query type because of the algorithm it uses.
    <indexterm>
-    <primary>indexes</primary>
+    <primary>index</primary>
     <secondary>B-tree</secondary>
    </indexterm>
    <indexterm>
     <primary>B-tree</primary>
-    <see>indexes</see>
+    <see>index</see>
    </indexterm>
    By
    default, the <command>CREATE INDEX</command> command will create a
@@ -147,12 +147,12 @@ CREATE INDEX test1_id_index ON test1 (id);
 
   <para>
    <indexterm>
-    <primary>indexes</primary>
+    <primary>index</primary>
     <secondary>R-tree</secondary>
    </indexterm>
    <indexterm>
     <primary>R-tree</primary>
-    <see>indexes</see>
+    <see>index</see>
    </indexterm>
    R-tree indexes are especially suited for spatial data.  To create
    an R-tree index, use a command of the form
@@ -178,12 +178,12 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
 
   <para>
    <indexterm>
-    <primary>indexes</primary>
+    <primary>index</primary>
     <secondary>hash</secondary>
    </indexterm>
    <indexterm>
     <primary>hash</primary>
-    <see>indexes</see>
+    <see>index</see>
    </indexterm>
    The query planner will consider using a hash index whenever an
    indexed column is involved in a comparison using the
@@ -219,7 +219,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
   <title>Multicolumn Indexes</title>
 
   <indexterm zone="indexes-multicolumn">
-   <primary>indexes</primary>
+   <primary>index</primary>
    <secondary>multicolumn</secondary>
   </indexterm>
 
@@ -294,7 +294,7 @@ SELECT name FROM test2 WHERE major = <replaceable>constant</replaceable> OR mino
   <title>Unique Indexes</title>
 
   <indexterm zone="indexes-unique">
-   <primary>indexes</primary>
+   <primary>index</primary>
    <secondary>unique</secondary>
   </indexterm>
 
@@ -337,8 +337,8 @@ CREATE UNIQUE INDEX <replaceable>name</replaceable> ON <replaceable>table</repla
   <title>Indexes on Expressions</title>
 
   <indexterm zone="indexes-expressional">
-   <primary>indexes</primary>
-   <secondary>on expressions</secondary>
+   <primary>index</primary>
+   <secondary sortas="expressions">on expressions</secondary>
   </indexterm>
 
   <para>
@@ -392,6 +392,10 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name));
  <sect1 id="indexes-opclass">
   <title>Operator Classes</title>
 
+  <indexterm zone="indexes-opclass">
+   <primary>operator class</primary>
+  </indexterm>
+
   <para>
    An index definition may specify an <firstterm>operator
    class</firstterm> for each column of an index.
@@ -492,7 +496,7 @@ SELECT am.amname AS index_method,
   <title>Partial Indexes</title>
 
   <indexterm zone="indexes-partial">
-   <primary>indexes</primary>
+   <primary>index</primary>
    <secondary>partial</secondary>
   </indexterm>
 
@@ -709,6 +713,11 @@ CREATE UNIQUE INDEX tests_success_constraint ON tests (subject, target)
  <sect1 id="indexes-examine">
   <title>Examining Index Usage</title>
 
+  <indexterm zone="indexes-examine">
+   <primary>index</primary>
+   <secondary>examining usage</secondary>
+  </indexterm>
+
   <para>
    Although indexes in <productname>PostgreSQL</> do not need
    maintenance and tuning, it is still important to check
index 6f4f848602334c89711b51b61a1cf095eef964bb..ac24dc767208d3e41b18fbbf104699c0793a7b4a 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.138 2003/08/04 04:03:03 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.138.2.1 2003/09/07 04:36:41 momjian Exp $ -->
 
 <chapter id="installation">
  <title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -169,10 +169,9 @@ su - postgres
 
     <listitem>
      <para>
-      To build the Python interface module or the PL/Python server
-      programming language, you need a Python installation, including
-      the header files.
-      Since PL/Python will be a shared library, the
+      To build the PL/Python server programming language, you need a
+      Python installation, including the header files.  Since
+      PL/Python will be a shared library, the
       <indexterm><primary>libpython</primary></indexterm>
       <filename>libpython</filename> library must be a shared library
       also on most platforms.  This is not the case in a default
@@ -383,6 +382,7 @@ JAVACMD=$JAVA_HOME/bin/java
     <para>
      <indexterm>
       <primary>pg_dumpall</primary>
+      <secondary>use during upgrade</secondary>
      </indexterm>
 
      To back up your database installation, type:
@@ -750,10 +750,7 @@ JAVACMD=$JAVA_HOME/bin/java
        <term><option>--with-python</option></term>
        <listitem>
         <para>
-         Build the Python interface module and the PL/Python
-         server-side language. You need to have root access to be able
-         to install the Python module at its default place
-         (<filename>/usr/lib/python<replaceable>x</>.<replaceable>y</></>).
+         Build the PL/Python server-side language.
         </para>
        </listitem>
       </varlistentry>
@@ -875,8 +872,8 @@ JAVACMD=$JAVA_HOME/bin/java
        <term><option>--with-pam</option></term>
        <listitem>
         <para>
-        Build with <acronym>PAM</> (Pluggable Authentication Modules)
-        support.
+        Build with <acronym>PAM</><indexterm><primary>PAM</></>
+        (Pluggable Authentication Modules) support.
         </para>
        </listitem>
       </varlistentry>
@@ -1078,20 +1075,6 @@ All of PostgreSQL is successfully made. Ready to install.
     possibly can, you will have to do manual work.
    </para>
 
-   <para>
-    If you built the Python interfaces and you were not the
-    root user when you executed the above command then that part of
-    the installation probably failed. In that case you should become
-    the root user and then do
-<screen>
-<userinput>gmake -C src/interfaces/python install</userinput>
-</screen>
-    If you do not have root access you are on your own: 
-    you can still take the required files and place them in 
-    other directories where Python can find them, but how to 
-    do that is left as an exercise.
-   </para>
-
    <para>
     The standard installation provides only the header files needed for client
     application development.  If you plan to do any server-side program
@@ -1163,7 +1146,7 @@ All of PostgreSQL is successfully made. Ready to install.
    <title>Shared Libraries</title>
 
    <indexterm>
-    <primary>shared libraries</primary>
+    <primary>shared library</primary>
    </indexterm>
 
    <para>
@@ -1284,7 +1267,6 @@ set path = ( /usr/local/pgsql/bin $path )
    <para>
     <indexterm>
      <primary><envar>MANPATH</envar></primary>
-     <seealso>man pages</seealso>
     </indexterm>
     To enable your system to find the <application>man</>
     documentation, you need to add lines like the following to a
index a577398bbb43fb435e7e649a0dee660e328e530a..b524f9dec8c4efcfa6c9d91c0d2025d78095578d 100644 (file)
@@ -1,10 +1,18 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.47 2003/08/07 05:06:40 barry Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.47.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
  <chapter id="jdbc">
   <title><acronym>JDBC</acronym> Interface</title>
 
+  <indexterm zone="jdbc">
+   <primary>JDBC</primary>
+  </indexterm>
+
+  <indexterm zone="jdbc">
+   <primary>Java</primary>
+  </indexterm>
+
   <para>
    <acronym>JDBC</acronym> is a core <acronym>API</acronym> of Java 1.1 and later.
    It provides a standard set of
@@ -66,6 +74,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.47 2003/08/07 05:06:40
   <sect2 id="jdbc-classpath">
    <title>Setting up the Class Path</title>
 
+   <indexterm zone="jdbc-classpath">
+    <primary>class path</primary>
+   </indexterm>
+
+   <indexterm zone="jdbc-classpath">
+    <primary>CLASSPATH</primary>
+   </indexterm>
+
    <para>
     To use the driver, the JAR archive (named
     <filename>postgresql.jar</filename> if you built from source, otherwise
@@ -316,6 +332,18 @@ db.close();
   <sect1 id="jdbc-query">
    <title>Issuing a Query and Processing the Result</title>
 
+   <indexterm zone="jdbc-query">
+    <primary>Statement</primary>
+   </indexterm>
+
+   <indexterm zone="jdbc-query">
+    <primary>PreparedStatement</primary>
+   </indexterm>
+
+   <indexterm zone="jdbc-query">
+    <primary>ResultSet</primary>
+   </indexterm>
+
    <para>
     Any time you want to issue <acronym>SQL</acronym> statements to
     the database, you require a <classname>Statement</classname> or 
@@ -681,6 +709,16 @@ st.close();
  <sect1 id="jdbc-binary-data">
   <title>Storing Binary Data</title>
 
+  <indexterm zone="jdbc-binary-data">
+   <primary>bytea</primary>
+   <secondary sortas="JDBC">in JDBC</secondary>
+  </indexterm>
+
+  <indexterm zone="jdbc-binary-data">
+   <primary>large object</primary>
+   <secondary sortas="JDBC">in JDBC</secondary>
+  </indexterm>
+
   <para>
     <application>PostgreSQL</application> provides two distinct ways to 
     store binary data.  Binary data can be stored in a table using 
@@ -2597,6 +2635,11 @@ public void unlink(int oid) throws SQLException
  <sect1 id="jdbc-thread">
   <title>Using the Driver in a Multithreaded or a Servlet Environment</title>
 
+  <indexterm zone="jdbc-thread">
+   <primary>threads</primary>
+   <secondary sortas="JDBC">with JDBC</secondary>
+  </indexterm>
+
   <para>
    A problem with many <acronym>JDBC</acronym> drivers is that only
    one thread can use a <classname>Connection</classname> at any one
@@ -2645,6 +2688,15 @@ public void unlink(int oid) throws SQLException
  <sect1 id="jdbc-datasource">
   <title>Connection Pools and Data Sources</title>
 
+  <indexterm zone="jdbc-datasource">
+   <primary>connection pool</primary>
+   <secondary sortas="JDBC">in JDBC</secondary>
+  </indexterm>
+
+  <indexterm zone="jdbc-datasource">
+   <primary>DataSource</primary>
+  </indexterm>
+
   <para>
     <acronym>JDBC</> 2 introduced standard connection pooling features in an
     add-on <acronym>API</> known as the <acronym>JDBC</acronym> 2.0 Optional
@@ -3029,7 +3081,11 @@ try {
   </sect2>
 
   <sect2 id="jdbc-jndi">
-    <title>Data Sources and <acronym>JNDI</acronym></title>
+   <title>Data Sources and <acronym>JNDI</acronym></title>
+
+   <indexterm zone="jdbc-jndi">
+    <primary>JNDI</primary>
+   </indexterm>
 
     <para>
      All the <literal>ConnectionPoolDataSource</literal> and
index 26764553f874b2b5b8b1ab32f00804c70f32bed8..b6d129354a2c46c678d0d9f347928539d99650b8 100644 (file)
@@ -1,10 +1,10 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/keywords.sgml,v 2.9 2003/06/12 07:49:43 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/keywords.sgml,v 2.9.2.1 2003/09/07 04:36:42 momjian Exp $ -->
 
 <appendix id="sql-keywords-appendix">
  <title><acronym>SQL</acronym> Key Words</title>
 
  <indexterm zone="sql-keywords-appendix">
-  <primary>key words</primary>
+  <primary>key word</primary>
   <secondary>list of</secondary>
  </indexterm>
 
index 220a7d42be2dc6617f51d947354801ceaf9e576e..afcc7061edef455661c35893d977179243dd7d6b 100644 (file)
   <para>
    The <function>pg_lo_*</function> commands are interfaces to the
    large object features of
-   <ProductName>PostgreSQL</ProductName>.<indexterm><primary>Large
-   Object</></> The functions are designed to mimic the analogous file
+   <ProductName>PostgreSQL</ProductName>.<indexterm><primary>large
+   object</><secondary>in pgctl</></> The functions are designed to mimic the analogous file
    system functions in the standard Unix file system interface.  The
    <function>pg_lo_*</function> commands should be used within a
    <command>BEGIN</command>/<command>COMMIT</command> transaction
@@ -1043,12 +1043,12 @@ pg_listen <parameter>conn</parameter> <parameter>notifyName</parameter> <optiona
    message bearing the given name arrives from the server.  This
    occurs when any <productname>PostgreSQL</productname> client
    application issues a
-   <command>NOTIFY</command><indexterm><primary>NOTIFY</><secondary>in
-   pgtcl</></> command referencing that name.  The command string is
-   executed from the Tcl idle loop.  That is the normal idle state of
-   an application written with Tk.  In non-Tk Tcl shells, you can
-   execute <function>update</function> or <function>vwait</function>
-   to cause the idle loop to be entered.
+   <command>NOTIFY</command><indexterm><primary>NOTIFY</><secondary
+   sortas="pgtcl">in pgtcl</></> command referencing that name.  The
+   command string is executed from the Tcl idle loop.  That is the
+   normal idle state of an application written with Tk.  In non-Tk Tcl
+   shells, you can execute <function>update</function> or
+   <function>vwait</function> to cause the idle loop to be entered.
   </para>
 
   <para>
index 8284d4b5f8d9aba2bdbb4d971948f94a611d124e..935b1c1186df0e94fc3b7c3f539c6bfb69631f43 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.131 2003/08/13 16:29:03 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.131.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
  <chapter id="libpq">
@@ -9,6 +9,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.131 2003/08/13 16:29:03 tgl
    <primary>libpq</primary>
   </indexterm>
 
+  <indexterm zone="libpq">
+   <primary>C</primary>
+  </indexterm>
+
   <para>
    <application>libpq</application> is the <acronym>C</acronym>
    application programmer's interface to
@@ -31,9 +35,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.131 2003/08/13 16:29:03 tgl
   </para>
 
   <para>
-   Client programs that use <application>libpq</application> must include the
-   header file <filename>libpq-fe.h</filename> and must link with the
-   <application>libpq</application> library.
+   Client programs that use <application>libpq</application> must
+   include the header file
+   <filename>libpq-fe.h</filename><indexterm><primary>libpq-fe.h</></>
+   and must link with the <application>libpq</application> library.
   </para>
 
  <sect1 id="libpq-connect">
@@ -45,17 +50,18 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.131 2003/08/13 16:29:03 tgl
    application program can have several backend connections open at
    one time.  (One reason to do that is to access more than one
    database.)  Each connection is represented by a
-   <structname>PGconn</> object which is obtained from the function
-   <function>PQconnectdb</> or <function>PQsetdbLogin</>.  Note that
-   these functions will always return a non-null object pointer,
-   unless perhaps there is too little memory even to allocate the
-   <structname>PGconn</> object.  The <function>PQstatus</> function
-   should be called to check whether a connection was successfully
-   made before queries are sent via the connection object.
+   <structname>PGconn</><indexterm><primary>PGconn</></> object which
+   is obtained from the function <function>PQconnectdb</> or
+   <function>PQsetdbLogin</>.  Note that these functions will always
+   return a non-null object pointer, unless perhaps there is too
+   little memory even to allocate the <structname>PGconn</> object.
+   The <function>PQstatus</> function should be called to check
+   whether a connection was successfully made before queries are sent
+   via the connection object.
 
    <variablelist>
     <varlistentry>
-     <term><function>PQconnectdb</function></term>
+     <term><function>PQconnectdb</function><indexterm><primary>PQconnectdb</></></term>
      <listitem>
       <para>
        Makes a new connection to the database server.
@@ -93,12 +99,13 @@ PGconn *PQconnectdb(const char *conninfo);
      <term><literal>host</literal></term>
      <listitem>
      <para>
-      Name of host to connect to. 
-      If this begins with a slash, it specifies Unix-domain communication
-      rather than TCP/IP communication; the value is the name of the
-      directory in which the socket file is stored.
-      The default is to connect to a Unix-domain socket in
-      <filename>/tmp</filename>.
+      Name of host to connect to.<indexterm><primary>host name</></>
+      If this begins with a slash, it specifies Unix-domain
+      communication rather than TCP/IP communication; the value is the
+      name of the directory in which the socket file is stored.  The
+      default is to connect to a Unix-domain socket in
+      <filename>/tmp</filename>.<indexterm><primary>Unix domain
+      socket</></>
      </para>
      </listitem>
     </varlistentry>
@@ -144,8 +151,9 @@ PGconn *PQconnectdb(const char *conninfo);
      <term><literal>port</literal></term>
      <listitem>
      <para>
-      Port number to connect to at the server host,
-      or socket file name extension for Unix-domain connections.
+      Port number to connect to at the server host, or socket file
+      name extension for Unix-domain
+      connections.<indexterm><primary>port</></>
      </para>
      </listitem>
     </varlistentry>
@@ -209,44 +217,51 @@ PGconn *PQconnectdb(const char *conninfo);
     <varlistentry>
      <term><literal>sslmode</literal></term>
      <listitem>
-        <para>
-      This option determines whether or with what priority an <acronym>SSL</>
-      connection will be negotiated with the server. There are four
-      modes: <literal>disable</> will attempt only an unencrypted
-      <acronym>SSL</> connection; <literal>allow</> will negotiate,
-      trying first a non-<acronym>SSL</> connection, then if that fails,
-      trying an <acronym>SSL</> connection; <literal>prefer</>
-         (the default) will negotiate, trying first an <acronym>SSL</> connection,
-         then if that fails, trying a regular non-<acronym>SSL</> connection;
-      <literal>require</> will try only an <acronym>SSL</> connection.
-        </para>
-        <para>
-         If <productname>PostgreSQL</> is compiled without SSL support,
-         using option <literal>require</> will cause an error, and options
-         <literal>allow</> and <literal>prefer</> will be tolerated but
-         <application>libpq</> will be unable to negotiate an <acronym>SSL</>
-         connection.
-     </para>
+      <para>
+       This option determines whether or with what priority an
+       <acronym>SSL</> connection will be negotiated with the
+       server. There are four modes: <literal>disable</> will attempt
+       only an unencrypted <acronym>SSL</> connection;
+       <literal>allow</> will negotiate, trying first a
+       non-<acronym>SSL</> connection, then if that fails, trying an
+       <acronym>SSL</> connection; <literal>prefer</> (the default)
+       will negotiate, trying first an <acronym>SSL</> connection,
+       then if that fails, trying a regular non-<acronym>SSL</>
+       connection; <literal>require</> will try only an
+       <acronym>SSL</> connection.
+      </para>
+
+      <para>
+       If <productname>PostgreSQL</> is compiled without SSL support,
+       using option <literal>require</> will cause an error, and
+       options <literal>allow</> and <literal>prefer</> will be
+       tolerated but <application>libpq</> will be unable to negotiate
+       an <acronym>SSL</>
+       connection.<indexterm><primary>SSL</><secondary
+       sortas="libpq">with libpq</></indexterm>
+      </para>
      </listitem>
     </varlistentry>
 
     <varlistentry>
      <term><literal>requiressl</literal></term>
      <listitem>
-     <para>
-         This option is deprecated in favor of the <literal>sslmode</>
-         setting.
-        </para>
-        <para>
-      If set to 1, an <acronym>SSL</acronym> connection to the server is required
-         (this is equivalent to <literal>sslmode</> <literal>require</>).
-      <application>libpq</> will then refuse to connect if the server does not
-      accept an <acronym>SSL</acronym> connection.
-      If set to 0 (default), <application>libpq</> will negotiate the connection
-         type with the server (equivalent to <literal>sslmode</> <literal>prefer</>).
-      This option is only available if
-      <productname>PostgreSQL</> is compiled with SSL support.
-     </para>
+      <para>
+       This option is deprecated in favor of the <literal>sslmode</>
+       setting.
+      </para>
+
+      <para>
+       If set to 1, an <acronym>SSL</acronym> connection to the server
+       is required (this is equivalent to <literal>sslmode</>
+       <literal>require</>).  <application>libpq</> will then refuse
+       to connect if the server does not accept an
+       <acronym>SSL</acronym> connection.  If set to 0 (default),
+       <application>libpq</> will negotiate the connection type with
+       the server (equivalent to <literal>sslmode</>
+       <literal>prefer</>).  This option is only available if
+       <productname>PostgreSQL</> is compiled with SSL support.
+      </para>
      </listitem>
     </varlistentry>
 
@@ -274,7 +289,7 @@ PGconn *PQconnectdb(const char *conninfo);
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQsetdbLogin</function></term>
+  <term><function>PQsetdbLogin</function><indexterm><primary>PQsetdbLogin</></></term>
   <listitem>
    <para>
        Makes a new connection to the database server.
@@ -299,7 +314,7 @@ PGconn *PQsetdbLogin(const char *pghost,
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQsetdb</function></term>
+  <term><function>PQsetdb</function><indexterm><primary>PQsetdb</></></term>
   <listitem>
    <para>
    Makes a new connection to the database server.
@@ -321,8 +336,8 @@ PGconn *PQsetdb(char *pghost,
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQconnectStart</function></term>
-  <term><function>PQconnectPoll</function></term>
+  <term><function>PQconnectStart</function><indexterm><primary>PQconnectStart</></></term>
+  <term><function>PQconnectPoll</function><indexterm><primary>PQconnectPoll</></></term>
   <listitem>
   <para>
    <indexterm><primary>nonblocking connection</primary></indexterm>
@@ -515,7 +530,7 @@ switch(PQstatus(conn))
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQconndefaults</function></term>
+  <term><function>PQconndefaults</function><indexterm><primary>PQconndefaults</></></term>
   <listitem>
    <para>
    Returns the default connection options.
@@ -560,7 +575,7 @@ typedef struct
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQfinish</function></term>
+  <term><function>PQfinish</function><indexterm><primary>PQfinish</></></term>
   <listitem>
    <para>
    Closes  the  connection to the server.  Also frees
@@ -581,7 +596,7 @@ void PQfinish(PGconn *conn);
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQreset</function></term>
+  <term><function>PQreset</function><indexterm><primary>PQreset</></></term>
   <listitem>
    <para>
    Resets the communication channel to the server.
@@ -601,8 +616,8 @@ void PQreset(PGconn *conn);
  </varlistentry>
 
  <varlistentry>
-  <term><function>PQresetStart</function></term>
-  <term><function>PQresetPoll</function></term>
+  <term><function>PQresetStart</function><indexterm><primary>PQresetStart</></></term>
+  <term><function>PQresetPoll</function><indexterm><primary>PQresetPoll</></></term>
   <listitem>
    <para>
    Reset the communication channel to the server, in a nonblocking manner.
@@ -665,7 +680,7 @@ These values are fixed for the life of the <structname>PGconn</> object.
 
 <variablelist>
 <varlistentry>
-<term><function>PQdb</function></term>
+<term><function>PQdb</function><indexterm><primary>PQdb</></></term>
 <listitem>
 <para>
          Returns the database name of the connection.
@@ -677,7 +692,7 @@ char *PQdb(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQuser</function></term>
+<term><function>PQuser</function><indexterm><primary>PQuser</></></term>
 <listitem>
 <para>
          Returns the user name of the connection.
@@ -689,7 +704,7 @@ char *PQuser(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQpass</function></term>
+<term><function>PQpass</function><indexterm><primary>PQpass</></></term>
 <listitem>
 <para>
          Returns the password of the connection.
@@ -701,7 +716,7 @@ char *PQpass(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQhost</function></term>
+<term><function>PQhost</function><indexterm><primary>PQhost</></></term>
 <listitem>
 <para>
          Returns the server host name of the connection.
@@ -713,7 +728,7 @@ char *PQhost(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQport</function></term>
+<term><function>PQport</function><indexterm><primary>PQport</></></term>
 <listitem>
 <para>
          Returns the port of the connection.
@@ -725,13 +740,13 @@ char *PQport(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQtty</function></term>
+<term><function>PQtty</function><indexterm><primary>PQtty</></></term>
 <listitem>
 <para>
          Returns the debug <acronym>TTY</acronym> of the connection.
-        (This is obsolete, since the server no longer pays attention
-        to the <acronym>TTY</acronym> setting, but the function remains
-        for backwards compatibility.)
+         (This is obsolete, since the server no longer pays attention
+         to the <acronym>TTY</acronym> setting, but the function remains
+         for backwards compatibility.)
 <synopsis>
 char *PQtty(const PGconn *conn);
 </synopsis>
@@ -740,7 +755,7 @@ char *PQtty(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQoptions</function></term>
+<term><function>PQoptions</function><indexterm><primary>PQoptions</></></term>
 <listitem>
 <para>
        Returns the command-line options passed in the connection request.
@@ -759,7 +774,7 @@ are executed on the <structname>PGconn</> object.
 
 <variablelist>
 <varlistentry>
-<term><function>PQstatus</function></term>
+<term><function>PQstatus</function><indexterm><primary>PQstatus</></></term>
 <listitem>
 <para>
          Returns the status of the connection. 
@@ -795,7 +810,7 @@ ConnStatusType PQstatus(const PGconn *conn);
     </varlistentry>
 
 <varlistentry>
-<term><function>PQtransactionStatus</function></term>
+<term><function>PQtransactionStatus</function><indexterm><primary>PQtransactionStatus</></></term>
 <listitem>
 <para>
          Returns the current in-transaction status of the server.
@@ -823,7 +838,7 @@ deprecated and does not exist in later server versions.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQparameterStatus</function></term>
+<term><function>PQparameterStatus</function><indexterm><primary>PQparameterStatus</></></term>
 <listitem>
 <para>
          Looks up a current parameter setting of the server.
@@ -841,27 +856,27 @@ is not known.
 <para>
 Parameters reported as of the current release include
 <literal>server_version</> (cannot change after startup);
-<literal>server_encoding</> (also not presently changeable after start);
 <literal>client_encoding</>,
-<literal>is_superuser</>, and
+<literal>is_superuser</>,
+<literal>session_authorization</literal>, and
 <literal>DateStyle</>.
 </para>
 
 <para>
-Pre-3.0-protocol servers do not report parameter settings,
-but <application>libpq</> includes logic to obtain values for 
-<literal>server_version</>, <literal>server_encoding</>, and
-<literal>client_encoding</>.  Applications are encouraged to use
-<function>PQparameterStatus</> rather than ad-hoc code to determine these
-values.  (Beware however that on a pre-3.0 connection, changing
-<literal>client_encoding</> via <command>SET</> after connection startup
-will not be reflected by <function>PQparameterStatus</>.)
+Pre-3.0-protocol servers do not report parameter settings, but
+<application>libpq</> includes logic to obtain values for
+<literal>server_version</>, and <literal>client_encoding</>.
+Applications are encouraged to use <function>PQparameterStatus</>
+rather than ad-hoc code to determine these values.  (Beware however
+that on a pre-3.0 connection, changing <literal>client_encoding</> via
+<command>SET</> after connection startup will not be reflected by
+<function>PQparameterStatus</>.)
 </para>
 </listitem>
 </varlistentry>
 
 <varlistentry>
-<term><function>PQprotocolVersion</function></term>
+<term><function>PQprotocolVersion</function><indexterm><primary>PQprotocolVersion</></></term>
 <listitem>
 <para>
          Interrogates the frontend/backend protocol being used.
@@ -881,7 +896,7 @@ only protocol 2.0.  (Protocol 1.0 is obsolete and not supported by libpq.)
 </varlistentry>
 
     <varlistentry>
-     <term><function>PQerrorMessage</function></term>
+     <term><function>PQerrorMessage</function><indexterm><primary>PQerrorMessage</></></term>
      <listitem>
       <para>
        <indexterm><primary>error message</></>
@@ -903,7 +918,7 @@ char *PQerrorMessage(const PGconn* conn);
     </varlistentry>
 
     <varlistentry>
-     <term><function>PQsocket</function></term>
+     <term><function>PQsocket</function><indexterm><primary>PQsocket</></></term>
      <listitem>
       <para>
        Obtains the file descriptor number of the connection socket to
@@ -919,11 +934,13 @@ int PQsocket(const PGconn *conn);
     </varlistentry>
 
     <varlistentry>
-     <term><function>PQbackendPID</function></term>
+     <term><function>PQbackendPID</function><indexterm><primary>PQbackendPID</></></term>
      <listitem>
       <para>
-       Returns the process <acronym>ID</acronym> of the backend server process
-       handling this connection.
+       Returns the process <acronym>ID</acronym>
+       (PID)<indexterm><primary>PID</><secondary>determining PID of
+       server process</><tertiary>in libpq</></> of the backend server
+       process handling this connection.
 <synopsis>
 int PQbackendPID(const PGconn *conn);
 </synopsis>
@@ -941,10 +958,10 @@ int PQbackendPID(const PGconn *conn);
     </varlistentry>
 
     <varlistentry>
-     <term><function>PQgetssl</function></term>
+     <term><function>PQgetssl</function><indexterm><primary>PQgetssl</></></term>
      <listitem>
       <para>
-       <indexterm><primary>SSL</></>
+       <indexterm><primary>SSL</><secondary sortas="libpq">in libpq</secondary></indexterm>
        Returns the SSL structure used in the connection, or null
        if SSL is not in use. 
 <synopsis>
@@ -985,7 +1002,7 @@ SQL queries and commands.
 <para>
 <variablelist>
 <varlistentry>
-<term><function>PQexec</function></term>
+<term><function>PQexec</function><indexterm><primary>PQexec</></></term>
 <listitem>
 <para>
           Submits a command to the server
@@ -1001,8 +1018,8 @@ PGresult *PQexec(PGconn *conn, const char *command);
           out-of-memory conditions or serious errors such as inability
           to send the command to the server.
           If a null pointer is returned, it
-         should be treated like a <symbol>PGRES_FATAL_ERROR</symbol> result.  Use
-         <function>PQerrorMessage</function> to get more information about the error.
+          should be treated like a <symbol>PGRES_FATAL_ERROR</symbol> result.  Use
+          <function>PQerrorMessage</function> to get more information about the error.
 </para>
 </listitem>
 </varlistentry>
@@ -1022,12 +1039,12 @@ condition.
 <para>
 <variablelist>
 <varlistentry>
-<term><function>PQexecParams</function></term>
+<term><function>PQexecParams</function><indexterm><primary>PQexecParams</></></term>
 <listitem>
 <para>
           Submits a command to the server and waits for the result,
-         with the ability to pass parameters separately from the SQL
-         command text.
+          with the ability to pass parameters separately from the SQL
+          command text.
 <synopsis>
 PGresult *PQexecParams(PGconn *conn,
                        const char *command,
@@ -1093,11 +1110,11 @@ but has some usefulness as an extra defense against SQL-injection attacks.
 <para>
 <variablelist>
 <varlistentry>
-<term><function>PQexecPrepared</function></term>
+<term><function>PQexecPrepared</function><indexterm><primary>PQexecPrepared</></></term>
 <listitem>
 <para>
           Sends a request to execute a prepared statement with given
-         parameters, and waits for the result.
+          parameters, and waits for the result.
 <synopsis>
 PGresult *PQexecPrepared(PGconn *conn,
                          const char *stmtName,
@@ -1138,16 +1155,19 @@ future release.
 </para>
 
 <para>
-The <structname>PGresult</structname> structure encapsulates the result
-returned by the server.
-<application>libpq</application> application programmers should be careful to
-maintain the <structname>PGresult</structname> abstraction.  Use the accessor functions below to get
-at the contents of <structname>PGresult</structname>.  Avoid directly referencing the fields of the
-<structname>PGresult</structname> structure because they are subject to change in the future.
+The
+<structname>PGresult</structname><indexterm><primary>PGresult</></>
+structure encapsulates the result returned by the server.
+<application>libpq</application> application programmers should be
+careful to maintain the <structname>PGresult</structname> abstraction.
+Use the accessor functions below to get at the contents of
+<structname>PGresult</structname>.  Avoid directly referencing the
+fields of the <structname>PGresult</structname> structure because they
+are subject to change in the future.
 
 <variablelist>
 <varlistentry>
-<term><function>PQresultStatus</function></term>
+<term><function>PQresultStatus</function><indexterm><primary>PQresultStatus</></></term>
 <listitem>
 <para>
           Returns the result status of the command.
@@ -1238,11 +1258,11 @@ processor (see <xref linkend="libpq-notice-processing">).
 </varlistentry>
 
 <varlistentry>
-<term><function>PQresStatus</function></term>
+<term><function>PQresStatus</function><indexterm><primary>PQresStatus</></></term>
 <listitem>
 <para>
-       Converts the enumerated type returned by <function>PQresultStatus</> into
-       a string constant describing the status code.
+        Converts the enumerated type returned by <function>PQresultStatus</> into
+        a string constant describing the status code.
 <synopsis>
 char *PQresStatus(ExecStatusType status);
 </synopsis>
@@ -1251,7 +1271,7 @@ char *PQresStatus(ExecStatusType status);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQresultErrorMessage</function></term>
+<term><function>PQresultErrorMessage</function><indexterm><primary>PQresultErrorMessage</></></term>
 <listitem>
 <para>
 Returns the error message associated with the command, or an empty string
@@ -1276,27 +1296,145 @@ when you want to know the status from the latest operation on the connection.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQresultErrorField</function></term>
+<term><function>PQresultErrorField</function><indexterm><primary>PQresultErrorField</></></term>
 <listitem>
 <para>
 Returns an individual field of an error report.
 <synopsis>
 char *PQresultErrorField(const PGresult *res, int fieldcode);
 </synopsis>
-<parameter>fieldcode</> is an error field identifier defined by the
-<productname>PostgreSQL</> protocol (see <xref
-linkend="protocol-error-fields">), for example <literal>'C'</> for
-the SQLSTATE error code.  NULL is returned if the
+<parameter>fieldcode</> is an error field identifier; see the symbols
+listed below.  <symbol>NULL</symbol> is returned if the
 <structname>PGresult</structname> is not an error or warning result,
 or does not include the specified field.  Field values will normally
 not include a trailing newline.
 </para>
 
 <para>
-Errors generated internally by libpq will have severity and primary message,
-but typically no other fields.  Errors returned by a pre-3.0-protocol server
-will include severity and primary message, and sometimes a detail message,
-but no other fields.
+The following field codes are available:
+<variablelist>
+
+<varlistentry>
+<term><symbol>PG_DIAG_SEVERITY</></term>
+<listitem>
+<para>
+The severity; the field contents are <literal>ERROR</>,
+<literal>FATAL</>, or <literal>PANIC</> (in an error message), or
+<literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>,
+<literal>INFO</>, or <literal>LOG</> (in a notice message), or a
+localized translation of one of these.  Always present.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_SQLSTATE</>
+</term>
+<listitem>
+<para>
+The SQLSTATE code for the error (a 5-character string following SQL
+spec conventions).  Not localizable.  Always present.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_MESSAGE_PRIMARY</></term>
+<listitem>
+<para>
+The primary human-readable error message (typically one line).  Always
+present.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_MESSAGE_DETAIL</></term>
+<listitem>
+<para>
+Detail: an optional secondary error message carrying more detail about
+the problem.  May run to multiple lines.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_MESSAGE_HINT</></term>
+<listitem>
+<para>
+Hint: an optional suggestion what to do about the problem.  This is
+intended to differ from detail in that it offers advice (potentially
+inappropriate) rather than hard facts.  May run to multiple lines.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_STATEMENT_POSITION</></term>
+<listitem>
+<para>
+A string containing a decimal integer indicating an error cursor
+position as an index into the original statement string.  The first
+character has index 1, and positions are measured in characters not
+bytes.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_CONTEXT</></term>
+<listitem>
+<para>
+An indication of the context in which the error occurred.  Presently
+this includes a call stack traceback of active PL functions.  The
+trace is one entry per line, most recent first.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_SOURCE_FILE</></term>
+<listitem>
+<para>
+The file name of the source-code location where the error was
+reported.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_SOURCE_LINE</></term>
+<listitem>
+<para>
+The line number of the source-code location where the error was
+reported.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><symbol>PG_DIAG_SOURCE_FUNCTION</></term>
+<listitem>
+<para>
+The name of the source-code function reporting the error.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+
+<para>
+The client is responsible for formatting displayed information to meet
+its needs; in particular it should break long lines as needed.
+Newline characters appearing in the error message fields should be
+treated as paragraph breaks, not line breaks.
+</para>
+
+<para>
+Errors generated internally by <application>libpq</application> will
+have severity and primary message, but typically no other fields.
+Errors returned by a pre-3.0-protocol server will include severity and
+primary message, and sometimes a detail message, but no other fields.
 </para>
 
 <para>
@@ -1309,7 +1447,7 @@ Note that error fields are only available from
 </varlistentry>
 
 <varlistentry>
-<term><function>PQclear</function></term>
+<term><function>PQclear</function><indexterm><primary>PQclear</></></term>
 <listitem>
 <para>
           Frees  the  storage  associated with a <structname>PGresult</structname>.
@@ -1331,7 +1469,7 @@ void PQclear(PQresult *res);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQmakeEmptyPGresult</function></term>
+<term><function>PQmakeEmptyPGresult</function><indexterm><primary>PQmakeEmptyPGresult</></></term>
 <listitem>
 <para>
           Constructs an empty <structname>PGresult</structname> object with the given status.
@@ -1368,7 +1506,7 @@ values they will act as though the result has zero rows and zero columns.
 
 <variablelist>
 <varlistentry>
-<term><function>PQntuples</function></term>
+<term><function>PQntuples</function><indexterm><primary>PQntuples</></></term>
 <listitem>
 <para>
           Returns the number of rows (tuples)
@@ -1381,7 +1519,7 @@ int PQntuples(const PGresult *res);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQnfields</function></term>
+<term><function>PQnfields</function><indexterm><primary>PQnfields</></></term>
 <listitem>
 <para>
           Returns the number of columns (fields)
@@ -1394,7 +1532,7 @@ int PQnfields(const PGresult *res);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQfname</function></term>
+<term><function>PQfname</function><indexterm><primary>PQfname</></></term>
 <listitem>
 <para>
  Returns the column name associated with the given column number.
@@ -1412,7 +1550,7 @@ NULL is returned if the column number is out of range.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQfnumber</function></term>
+<term><function>PQfnumber</function><indexterm><primary>PQfnumber</></></term>
 <listitem>
 <para>
             Returns  the  column number
@@ -1430,7 +1568,7 @@ int PQfnumber(const PGresult *res,
 </varlistentry>
 
 <varlistentry>
-<term><function>PQftable</function></term>
+<term><function>PQftable</function><indexterm><primary>PQftable</></></term>
 <listitem>
 <para>
  Returns the OID of the table from which the given column was fetched.
@@ -1459,7 +1597,7 @@ exactly which table is referenced.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQftablecol</function></term>
+<term><function>PQftablecol</function><indexterm><primary>PQftablecol</></></term>
 <listitem>
 <para>
  Returns the column number (within its table) of the column making up
@@ -1480,7 +1618,7 @@ or when using pre-3.0 protocol.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQfformat</function></term>
+<term><function>PQfformat</function><indexterm><primary>PQfformat</></></term>
 <listitem>
 <para>
  Returns the format code indicating the format of the given column.
@@ -1500,7 +1638,7 @@ for future definition.)
 </varlistentry>
 
 <varlistentry>
-<term><function>PQftype</function></term>
+<term><function>PQftype</function><indexterm><primary>PQftype</></></term>
 <listitem>
 <para>
           Returns the data type associated with the
@@ -1523,7 +1661,7 @@ in the source tree.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQfmod</function></term>
+<term><function>PQfmod</function><indexterm><primary>PQfmod</></></term>
 <listitem>
 <para>
           Returns  the type modifier of the column
@@ -1545,7 +1683,7 @@ in which case the value is always -1.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQfsize</function></term>
+<term><function>PQfsize</function><indexterm><primary>PQfsize</></></term>
 <listitem>
 <para>
           Returns  the  size  in bytes of the column
@@ -1567,7 +1705,7 @@ A negative value indicates the data type is variable-length.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQbinaryTuples</function></term>
+<term><function>PQbinaryTuples</function><indexterm><primary>PQbinaryTuples</></></term>
 <listitem>
 <para>
 Returns 1 if the <structname>PGresult</> contains binary data
@@ -1589,11 +1727,11 @@ returns 1 only if all columns of the result are binary (format 1).
 </varlistentry>
 
 <varlistentry>
-<term><function>PQgetvalue</function></term>
+<term><function>PQgetvalue</function><indexterm><primary>PQgetvalue</></></term>
 <listitem>
 <para>
             Returns a single field value of one row
-           of a <structname>PGresult</structname>.
+            of a <structname>PGresult</structname>.
             Row and column numbers start at 0.
 <synopsis>
 char* PQgetvalue(const PGresult *res,
@@ -1629,8 +1767,8 @@ be used past the lifetime of the  <structname>PGresult</structname>  structure i
 </varlistentry>
 
 <varlistentry>
-<term><function>PQgetisnull</function></term>
-<listitem>
+<term><function>PQgetisnull</function><indexterm><primary>PQgetisnull</></></term>
+<indexterm><primary>null value</><secondary sortas="libpq">in libpq</></indexterm><listitem>
 <para>
            Tests a field for a null value.
            Row and column numbers start at 0.
@@ -1650,7 +1788,7 @@ will return an empty string, not a null pointer, for a null field.)
 </varlistentry>
 
 <varlistentry>
-<term><function>PQgetlength</function></term>
+<term><function>PQgetlength</function><indexterm><primary>PQgetlength</></></term>
 <listitem>
 <para>
           Returns the actual length of a field value in bytes.
@@ -1673,7 +1811,7 @@ on <function>PQfsize</function> to obtain the actual data length.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQprint</function></term>
+<term><function>PQprint</function><indexterm><primary>PQprint</></></term>
 <listitem>
 <para>
           Prints out all the rows and,  optionally,  the
@@ -1719,11 +1857,11 @@ results.
 
 <variablelist>
 <varlistentry>
-<term><function>PQcmdStatus</function></term>
+<term><function>PQcmdStatus</function><indexterm><primary>PQcmdStatus</></></term>
 <listitem>
 <para>
           Returns the command status tag from the SQL command that
-         generated the <structname>PGresult</structname>.
+          generated the <structname>PGresult</structname>.
 <synopsis>
 char * PQcmdStatus(PGresult *res);
 </synopsis>
@@ -1736,10 +1874,10 @@ data such as the number of rows processed.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQcmdTuples</function></term>
+<term><function>PQcmdTuples</function><indexterm><primary>PQcmdTuples</></></term>
 <listitem>
 <para>
-         Returns the number of rows affected by the SQL command.
+          Returns the number of rows affected by the SQL command.
 <synopsis>
 char * PQcmdTuples(PGresult *res);
 </synopsis>
@@ -1747,23 +1885,25 @@ char * PQcmdTuples(PGresult *res);
 
 <para>
           If the <acronym>SQL</acronym> command that generated the
-         <structname>PGresult</structname> was <command>INSERT</>,
-         <command>UPDATE</>, <command>DELETE</command>, <command>MOVE</>,
-         or <command>FETCH</>, this returns a
-         string containing the number of rows affected.  If the
+          <structname>PGresult</structname> was <command>INSERT</>,
+          <command>UPDATE</>, <command>DELETE</command>, <command>MOVE</>,
+          or <command>FETCH</>, this returns a
+          string containing the number of rows affected.  If the
           command was anything else, it returns the empty string.
 </para>
 </listitem>
 </varlistentry>
 
 <varlistentry>
-<term><function>PQoidValue</function></term>
+<term><function>PQoidValue</function><indexterm><primary>PQoidValue</></></term>
 <listitem>
 <para>
-          Returns the OID of the inserted row, if the
-         <acronym>SQL</acronym> command was an <command>INSERT</command>
-         that inserted exactly one row into a table that has OIDs.
-          Otherwise, returns <literal>InvalidOid</literal>.
+          Returns the OID<indexterm><primary>OID</><secondary>in
+          libpq</></> of the inserted row, if the
+          <acronym>SQL</acronym> command was an
+          <command>INSERT</command> that inserted exactly one row into
+          a table that has OIDs.  Otherwise, returns
+          <literal>InvalidOid</literal>.
 <synopsis>
 Oid PQoidValue(const PGresult *res);
 </synopsis>
@@ -1772,7 +1912,7 @@ Oid PQoidValue(const PGresult *res);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQoidStatus</function></term>
+<term><function>PQoidStatus</function><indexterm><primary>PQoidStatus</></></term>
 <listitem>
 <para>
           Returns a string with the OID of the inserted row, if the
@@ -1800,6 +1940,7 @@ It is not thread-safe.
 <sect2 id="libpq-exec-escape-string">
   <title>Escaping Strings for Inclusion in SQL Commands</title>
 
+   <indexterm zone="libpq-exec-escape-string"><primary>PQescapeString</></>
    <indexterm zone="libpq-exec-escape-string"><primary>escaping strings</></>
 
 <para>
@@ -1858,13 +1999,15 @@ strings overlap.
 
  <sect2 id="libpq-exec-escape-bytea">
   <title>Escaping Binary Strings for Inclusion in SQL Commands</title>
+
   <indexterm zone="libpq-exec-escape-bytea">
-   <primary>escaping binary strings</primary>
+   <primary>bytea</>
+   <secondary sortas="libpq">in libpq</>
   </indexterm>
 
   <variablelist>
   <varlistentry>
-  <term><function>PQescapeBytea</function></term>
+  <term><function>PQescapeBytea</function><indexterm><primary>PQescapeBytea</></></term>
   <listitem>
   <para>
    Escapes binary data for use within an SQL command with the type
@@ -1916,7 +2059,7 @@ unsigned char *PQescapeBytea(const unsigned char *from,
   </varlistentry>
 
   <varlistentry>
-  <term><function>PQunescapeBytea</function></term>
+  <term><function>PQunescapeBytea</function><indexterm><primary>PQunescapeBytea</></></term>
   <listitem>
   <para>
    Converts an escaped string representation of binary data into binary
@@ -1943,7 +2086,7 @@ unsigned char *PQunescapeBytea(const unsigned char *from, size_t *to_length);
   </varlistentry>
 
   <varlistentry>
-  <term><function>PQfreemem</function></term>
+  <term><function>PQfreemem</function><indexterm><primary>PQfreemem</></></term>
   <listitem>
   <para>
    Frees memory allocated by <application>libpq</>.
@@ -2016,32 +2159,32 @@ respectively.
 
 <variablelist>
 <varlistentry>
-<term><function>PQsendQuery</function></term>
+<term><function>PQsendQuery</function><indexterm><primary>PQsendQuery</></></term>
 <listitem>
 <para>
           Submits a command to the server without
-         waiting for the result(s).  1 is returned if the command was
-         successfully dispatched and 0 if not (in which case, use
-         <function>PQerrorMessage</> to get more information about the failure).
+          waiting for the result(s).  1 is returned if the command was
+          successfully dispatched and 0 if not (in which case, use
+          <function>PQerrorMessage</> to get more information about the failure).
 <synopsis>
 int PQsendQuery(PGconn *conn, const char *command);
 </synopsis>
 
-         After successfully calling <function>PQsendQuery</function>, call
+          After successfully calling <function>PQsendQuery</function>, call
           <function>PQgetResult</function> one or more
-         times to obtain the results.  <function>PQsendQuery</function> may not be called
-         again (on the same connection) until <function>PQgetResult</function> has returned a null pointer,
-         indicating that the command is done.
+          times to obtain the results.  <function>PQsendQuery</function> may not be called
+          again (on the same connection) until <function>PQgetResult</function> has returned a null pointer,
+          indicating that the command is done.
 </para>
 </listitem>
 </varlistentry>
 
 <varlistentry>
-<term><function>PQsendQueryParams</function></term>
+<term><function>PQsendQueryParams</function><indexterm><primary>PQsendQueryParams</></></term>
 <listitem>
 <para>
           Submits a command and separate parameters to the server without
-         waiting for the result(s).
+          waiting for the result(s).
 <synopsis>
 int PQsendQueryParams(PGconn *conn,
                       const char *command,
@@ -2053,22 +2196,22 @@ int PQsendQueryParams(PGconn *conn,
                       int resultFormat);
 </synopsis>
 
-       This is equivalent to <function>PQsendQuery</function> except that
-       query parameters can be specified separately from the query string.
-       The function's parameters are handled identically to
-       <function>PQexecParams</function>.  Like
-       <function>PQexecParams</function>, it will not work on 2.0-protocol
-       connections, and it allows only one command in the query string.
+        This is equivalent to <function>PQsendQuery</function> except that
+        query parameters can be specified separately from the query string.
+        The function's parameters are handled identically to
+        <function>PQexecParams</function>.  Like
+        <function>PQexecParams</function>, it will not work on 2.0-protocol
+        connections, and it allows only one command in the query string.
 </para>
 </listitem>
 </varlistentry>
 
 <varlistentry>
-<term><function>PQsendQueryPrepared</function></term>
+<term><function>PQsendQueryPrepared</function><indexterm><primary>PQsendQueryPrepared</></></term>
 <listitem>
 <para>
           Sends a request to execute a prepared statement with given
-         parameters, without waiting for the result(s).
+          parameters, without waiting for the result(s).
 <synopsis>
 int PQsendQueryPrepared(PGconn *conn,
                         const char *stmtName,
@@ -2079,41 +2222,41 @@ int PQsendQueryPrepared(PGconn *conn,
                         int resultFormat);
 </synopsis>
 
-       This is similar to <function>PQsendQueryParams</function>, but the
-       command to be executed is specified by naming a previously-prepared
-       statement, instead of giving a query string.
-       The function's parameters are handled identically to
-       <function>PQexecPrepared</function>.  Like
-       <function>PQexecPrepared</function>, it will not work on 2.0-protocol
-       connections.
+        This is similar to <function>PQsendQueryParams</function>, but the
+        command to be executed is specified by naming a previously-prepared
+        statement, instead of giving a query string.
+        The function's parameters are handled identically to
+        <function>PQexecPrepared</function>.  Like
+        <function>PQexecPrepared</function>, it will not work on 2.0-protocol
+        connections.
 </para>
 </listitem>
 </varlistentry>
 
 <varlistentry>
-<term><function>PQgetResult</function></term>
+<term><function>PQgetResult</function><indexterm><primary>PQgetResult</></></term>
 <listitem>
 <para>
           Waits for the next result from a prior
-         <function>PQsendQuery</function>,
-         <function>PQsendQueryParams</function>, or
-         <function>PQsendQueryPrepared</function> call,
-         and returns it.  A null pointer is returned when the command is complete
-         and there will be no more results.
+          <function>PQsendQuery</function>,
+          <function>PQsendQueryParams</function>, or
+          <function>PQsendQueryPrepared</function> call,
+          and returns it.  A null pointer is returned when the command is complete
+          and there will be no more results.
 <synopsis>
 PGresult *PQgetResult(PGconn *conn);
 </synopsis>
 </para>
 
 <para>
-         <function>PQgetResult</function> must be called repeatedly until it returns a null pointer,
-         indicating that the command is done.  (If called when no command is
-         active, <function>PQgetResult</function> will just return a null pointer at once.)
-         Each non-null result from <function>PQgetResult</function> should be processed using
-         the same <structname>PGresult</> accessor functions previously described.
-         Don't forget to free each result object with <function>PQclear</function> when done with it.
-         Note that <function>PQgetResult</function> will block only if a command is active and the
-         necessary response data has not yet been read by <function>PQconsumeInput</function>.
+          <function>PQgetResult</function> must be called repeatedly until it returns a null pointer,
+          indicating that the command is done.  (If called when no command is
+          active, <function>PQgetResult</function> will just return a null pointer at once.)
+          Each non-null result from <function>PQgetResult</function> should be processed using
+          the same <structname>PGresult</> accessor functions previously described.
+          Don't forget to free each result object with <function>PQclear</function> when done with it.
+          Note that <function>PQgetResult</function> will block only if a command is active and the
+          necessary response data has not yet been read by <function>PQconsumeInput</function>.
 </para>
 </listitem>
 </varlistentry>
@@ -2134,10 +2277,10 @@ more functions:
 
 <variablelist>
 <varlistentry>
-<term><function>PQconsumeInput</function></term>
+<term><function>PQconsumeInput</function><indexterm><primary>PQconsumeInput</></></term>
 <listitem>
 <para>
-         If input is available from the server, consume it.
+          If input is available from the server, consume it.
 <synopsis>
 int PQconsumeInput(PGconn *conn);
 </synopsis>
@@ -2165,7 +2308,7 @@ application can thus use <function>PQconsumeInput</function> to clear the
 </varlistentry>
 
 <varlistentry>
-<term><function>PQisBusy</function></term>
+<term><function>PQisBusy</function><indexterm><primary>PQisBusy</></></term>
 <listitem>
 <para>
 Returns 1 if a command is busy, that is, <function>PQgetResult</function> would block
@@ -2201,16 +2344,18 @@ if <function>PQisBusy</function> returns false (0).  It can also call
 </para>
 
 <para>
-A client that uses <function>PQsendQuery</function>/<function>PQgetResult</function>
-can also attempt to cancel a command that is still being processed by the server.
+A client that uses
+<function>PQsendQuery</function>/<function>PQgetResult</function> can
+also attempt to cancel a command that is still being processed by the
+server.<indexterm><primary>canceling</><secondary>SQL command</></>
 
 <variablelist>
 <varlistentry>
-<term><function>PQrequestCancel</function></term>
+<term><function>PQrequestCancel</function><indexterm><primary>PQrequestCancel</></></term>
 <listitem>
 <para>
-         Requests that the server abandon
-         processing of the current command.
+          Requests that the server abandon
+          processing of the current command.
 <synopsis>
 int PQrequestCancel(PGconn *conn);
 </synopsis>
@@ -2259,7 +2404,7 @@ functions may be used.
 
 <variablelist>
 <varlistentry>
- <term><function>PQsetnonblocking</function></term>
+ <term><function>PQsetnonblocking</function><indexterm><primary>PQsetnonblocking</></></term>
  <listitem>
    <para>
     Sets the nonblocking status of the connection.
@@ -2289,7 +2434,7 @@ int PQsetnonblocking(PGconn *conn, int arg);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQisnonblocking</function></term>
+<term><function>PQisnonblocking</function><indexterm><primary>PQisnonblocking</></></term>
 <listitem>
 <para>
        Returns the blocking status of the database connection.
@@ -2306,7 +2451,7 @@ int PQisnonblocking(const PGconn *conn);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQflush</function></term>
+<term><function>PQflush</function><indexterm><primary>PQflush</></></term>
 <listitem>
 <para>
 Attempts to flush any queued output data to the server.
@@ -2335,6 +2480,8 @@ and then read the response as described above.
 <sect1 id="libpq-fastpath">
 <title>The Fast-Path Interface</title>
 
+<indexterm zone="libpq-fastpath"><primary>fast path</></>
+
 <para>
 <productname>PostgreSQL</productname> provides a fast-path interface to send
 simple function calls to the server.
@@ -2350,8 +2497,8 @@ parameters and results substitutes for a fast-path function call.
 </tip>
 
 <para>
-The function <function>PQfn</function> requests execution of a server
-function via the fast-path interface:
+The function <function>PQfn</function><indexterm><primary>PQfn</></>
+requests execution of a server function via the fast-path interface:
 <synopsis>
 PGresult* PQfn(PGconn* conn,
                int fnid,
@@ -2417,7 +2564,10 @@ set-valued results when using this interface.
 <sect1 id="libpq-notify">
 <title>Asynchronous Notification</title>
 
-  <indexterm zone="libpq-notify"><primary>NOTIFY</primary></indexterm>
+  <indexterm zone="libpq-notify">
+   <primary>NOTIFY</primary>
+   <secondary>in libpq</secondary>
+  </indexterm>
 
 <para>
 <productname>PostgreSQL</productname> offers asynchronous notification via the
@@ -2433,9 +2583,11 @@ not necessary for there to be any associated table.
 </para>
 
 <para>
-<application>libpq</application> applications submit <command>LISTEN</command> and <command>UNLISTEN</command>
-commands as ordinary SQL commands.  The arrival of <command>NOTIFY</command>
-messages can subsequently be detected by calling <function>PQnotifies</function>.
+<application>libpq</application> applications submit
+<command>LISTEN</command> and <command>UNLISTEN</command> commands as
+ordinary SQL commands.  The arrival of <command>NOTIFY</command>
+messages can subsequently be detected by calling
+<function>PQnotifies</function>.<indexterm><primary>PQnotifies</></>
 </para>
 
 <para>
@@ -2443,8 +2595,8 @@ The function <function>PQnotifies</function>
           returns  the next notification from a list of unhandled
           notification messages received from the server.  It returns a null pointer if
           there are no pending notifications.  Once a notification is
-         returned from <function>PQnotifies</>, it is considered handled and will be
-         removed from the list of notifications.
+          returned from <function>PQnotifies</>, it is considered handled and will be
+          removed from the list of notifications.
 <synopsis>
 PGnotify* PQnotifies(PGconn *conn);
 
@@ -2570,7 +2722,7 @@ if any notifications came in during the processing of the command.
 
 <variablelist>
 <varlistentry>
-<term><function>PQnfields</function></term>
+<term><function>PQnfields</function><indexterm><primary>PQnfields</><secondary>with COPY</></></term>
 <listitem>
 <para>
           Returns the number of columns (fields) to be copied.
@@ -2579,30 +2731,30 @@ if any notifications came in during the processing of the command.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQbinaryTuples</function></term>
+<term><function>PQbinaryTuples</function><indexterm><primary>PQbinaryTuples</><secondary>with COPY</></></term>
 <listitem>
 <para>
                 0 indicates the overall copy format is textual (rows
-               separated by newlines, columns separated by separator
-               characters, etc).
-               1 indicates the overall copy format is binary.
-               See <xref linkend="sql-copy" endterm="sql-copy-title">
-               for more information.
+                separated by newlines, columns separated by separator
+                characters, etc).
+                1 indicates the overall copy format is binary.
+                See <xref linkend="sql-copy" endterm="sql-copy-title">
+                for more information.
 </para>
 </listitem>
 </varlistentry>
 
 <varlistentry>
-<term><function>PQfformat</function></term>
+<term><function>PQfformat</function><indexterm><primary>PQfformat</><secondary>with COPY</></></term>
 <listitem>
 <para>
           Returns the format code (0 for text, 1 for binary) associated
-         with each column of the copy operation.  The per-column format
-         codes will always be zero when the overall copy format is textual,
-         but the binary format can support both text and binary columns.
-         (However, as of the current implementation of <command>COPY</>,
-         only binary columns appear in a binary copy; so the per-column
-         formats always match the overall format at present.)
+          with each column of the copy operation.  The per-column format
+          codes will always be zero when the overall copy format is textual,
+          but the binary format can support both text and binary columns.
+          (However, as of the current implementation of <command>COPY</>,
+          only binary columns appear in a binary copy; so the per-column
+          formats always match the overall format at present.)
 </para>
 </listitem>
 </varlistentry>
@@ -2627,7 +2779,7 @@ When using protocol 2.0, all these functions will return 0.
 
 <variablelist>
 <varlistentry>
-<term><function>PQputCopyData</function></term>
+<term><function>PQputCopyData</function><indexterm><primary>PQputCopyData</></></term>
 <listitem>
 <para>
  Sends data to the server during <literal>COPY_IN</> state.
@@ -2658,7 +2810,7 @@ by the <command>COPY</> command; see
 </varlistentry>
 
 <varlistentry>
-<term><function>PQputCopyEnd</function></term>
+<term><function>PQputCopyEnd</function><indexterm><primary>PQputCopyEnd</></></term>
 <listitem>
 <para>
  Sends end-of-data indication to the server during <literal>COPY_IN</> state.
@@ -2710,7 +2862,7 @@ operation.
 
 <variablelist>
 <varlistentry>
-<term><function>PQgetCopyData</function></term>
+<term><function>PQgetCopyData</function><indexterm><primary>PQgetCopyData</></></term>
 <listitem>
 <para>
  Receives data from the server during <literal>COPY_OUT</> state.
@@ -2779,7 +2931,7 @@ operation.
 
 <variablelist>
 <varlistentry>
-<term><function>PQgetline</function></term>
+<term><function>PQgetline</function><indexterm><primary>PQgetline</></></term>
 <listitem>
 <para>
           Reads  a  newline-terminated  line  of  characters
@@ -2815,7 +2967,7 @@ for a terminator line).
 </varlistentry>
 
 <varlistentry>
-<term><function>PQgetlineAsync</function></term>
+<term><function>PQgetlineAsync</function><indexterm><primary>PQgetlineAsync</></></term>
 <listitem>
 <para>
           Reads a row of COPY data
@@ -2867,7 +3019,7 @@ than the room actually available.)
 </varlistentry>
 
 <varlistentry>
-<term><function>PQputline</function></term>
+<term><function>PQputline</function><indexterm><primary>PQputline</></></term>
 <listitem>
 <para>
 Sends  a  null-terminated  string  to  the server.
@@ -2901,7 +3053,7 @@ having sent the actual data.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQputnbytes</function></term>
+<term><function>PQputnbytes</function><indexterm><primary>PQputnbytes</></></term>
 <listitem>
 <para>
 Sends  a  non-null-terminated  string  to  the server.
@@ -2922,7 +3074,7 @@ specified directly.  Use this procedure when sending binary data.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQendcopy</function></term>
+<term><function>PQendcopy</function><indexterm><primary>PQendcopy</></></term>
 <listitem>
 <para>
  Synchronizes with the server.
@@ -2981,7 +3133,7 @@ These functions control miscellaneous details of
 
 <variablelist>
 <varlistentry>
-<term><function>PQsetErrorVerbosity</function></term>
+<term><function>PQsetErrorVerbosity</function><indexterm><primary>PQsetErrorVerbosity</></></term>
 <listitem>
 <para>
 Determines the verbosity of messages returned by
@@ -3007,7 +3159,7 @@ ones.
 </varlistentry>
 
 <varlistentry>
-<term><function>PQtrace</function></term>
+<term><function>PQtrace</function><indexterm><primary>PQtrace</></></term>
 <listitem>
 <para>
           Enables  tracing of the client/server communication to a debugging file stream.
@@ -3019,7 +3171,7 @@ void PQtrace(PGconn *conn, FILE *stream);
 </varlistentry>
 
 <varlistentry>
-<term><function>PQuntrace</function></term>
+<term><function>PQuntrace</function><indexterm><primary>PQuntrace</></></term>
 <listitem>
 <para>
           Disables tracing started by <function>PQtrace</function>.
@@ -3036,6 +3188,11 @@ void PQuntrace(PGconn *conn);
 <sect1 id="libpq-notice-processing">
 <title>Notice Processing</title>
 
+<indexterm zone="libpq-notice-processing">
+ <primary>notice processing</primary>
+ <secondary>in libpq</secondary>
+</indexterm>
+
 <para>
 Notice and warning messages generated by the server are not returned by the
 query execution functions, since they do not imply failure of the query.
@@ -3056,10 +3213,10 @@ work in the notice receiver.
 
 <para>
 The function <function>PQsetNoticeReceiver</function>
-<indexterm><primary>notice receiver</></>
+<indexterm><primary>notice receiver</></><indexterm><primary>PQsetNoticeReceiver</></>
 sets or examines the current notice receiver for a connection object.
 Similarly, <function>PQsetNoticeProcessor</function>
-<indexterm><primary>notice processor</></>
+<indexterm><primary>notice processor</></><indexterm><primary>PQsetNoticeProcessor</></>
 sets or examines the current notice processor.
 
 <synopsis>
@@ -3137,7 +3294,7 @@ functions like <function>PQgetvalue</function>.
 <title>Environment Variables</title>
 
 <indexterm zone="libpq-envars">
- <primary>environment variables</primary>
+ <primary>environment variable</primary>
 </indexterm>
 
 <para>
@@ -3426,11 +3583,12 @@ call <function>fe_setauthsvc</function> at all.
 </para>
 
 <para>
-<application>libpq</application> applications that use the <literal>crypt</literal>
-authentication method rely on the <literal>crypt()</literal> operating
-system function, which is often not thread-safe. It is better to use the
-<literal>md5</literal> method, which is thread-safe on all
-platforms.
+<application>libpq</application> applications that use the
+<literal>crypt</literal> authentication method rely on the
+<literal>crypt()</literal> operating system function, which is often
+not thread-safe.<indexterm><primary>crypt</><secondary>thread
+safety</></> It is better to use the <literal>md5</literal> method,
+which is thread-safe on all platforms.
 </para>
 </sect1>
 
@@ -3438,6 +3596,11 @@ platforms.
  <sect1 id="libpq-build">
   <title>Building <application>libpq</application> Programs</title>
 
+  <indexterm zone="libpq-build">
+   <primary>compiling</primary>
+   <secondary>libpq applications</secondary>
+  </indexterm>
+
   <para>
    To build (i.e., compile and link) your <application>libpq</application> programs you need to
    do all of the following things:
@@ -3482,12 +3645,12 @@ CPPFLAGS += -I/usr/local/pgsql/include
      </para>
 
      <para>
-      <indexterm><primary>pg_config</></>
       If there is any chance that your program might be compiled by
       other users then you should not hardcode the directory location
       like that.  Instead, you can run the utility
-      <command>pg_config</command> to find out where the header files
-      are on the local system:
+      <command>pg_config</command><indexterm><primary>pg_config</><secondary
+      sortas="libpq">with libpq</></> to find out where the header
+      files are on the local system:
 <screen>
 <prompt>$</prompt> pg_config --includedir
 <computeroutput>/usr/local/include</computeroutput>
@@ -3576,7 +3739,7 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage'
 /*
  * testlibpq.c
  *
- *             Test the C version of LIBPQ, the POSTGRES frontend library.
+ *              Test the C version of LIBPQ, the POSTGRES frontend library.
  */
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;
@@ -3585,112 +3748,112 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage'
 static void
 exit_nicely(PGconn *conn)
 {
-       PQfinish(conn);
-       exit(1);
+        PQfinish(conn);
+        exit(1);
 }
 
 int
 main(int argc, char **argv)
 {
-       const char *conninfo;
-       PGconn     *conn;
-       PGresult   *res;
-       int                     nFields;
-       int                     i,
-                               j;
-
-       /*
-        * If the user supplies a parameter on the command line, use it as
-        * the conninfo string; otherwise default to setting dbname=template1
-        * and using environment variables or defaults for all other connection
-        * parameters.
-        */
-       if (argc &gt; 1)
-               conninfo = argv[1];
-       else
-               conninfo = "dbname = template1";
-
-       /* Make a connection to the database */
-       conn = PQconnectdb(conninfo);
-
-       /* Check to see that the backend connection was successfully made */
-       if (PQstatus(conn) != CONNECTION_OK)
-       {
-               fprintf(stderr, "Connection to database '%s' failed.\n", PQdb(conn));
-               fprintf(stderr, "%s", PQerrorMessage(conn));
-               exit_nicely(conn);
-       }
-
-       /*
-        * Our test case here involves using a cursor, for which we must be
-        * inside a transaction block.  We could do the whole thing with a
-        * single PQexec() of "select * from pg_database", but that's too
-        * trivial to make a good example.
-        */
-
-       /* Start a transaction block */
-       res = PQexec(conn, "BEGIN");
-       if (PQresultStatus(res) != PGRES_COMMAND_OK)
-       {
-               fprintf(stderr, "BEGIN command failed: %s", PQerrorMessage(conn));
-               PQclear(res);
-               exit_nicely(conn);
-       }
-
-       /*
-        * Should PQclear PGresult whenever it is no longer needed to avoid
-        * memory leaks
-        */
-       PQclear(res);
-
-       /*
-        * Fetch rows from pg_database, the system catalog of databases
-        */
-       res = PQexec(conn, "DECLARE myportal CURSOR FOR select * from pg_database");
-       if (PQresultStatus(res) != PGRES_COMMAND_OK)
-       {
-               fprintf(stderr, "DECLARE CURSOR failed: %s", PQerrorMessage(conn));
-               PQclear(res);
-               exit_nicely(conn);
-       }
-       PQclear(res);
-
-       res = PQexec(conn, "FETCH ALL in myportal");
-       if (PQresultStatus(res) != PGRES_TUPLES_OK)
-       {
-               fprintf(stderr, "FETCH ALL failed: %s", PQerrorMessage(conn));
-               PQclear(res);
-               exit_nicely(conn);
-       }
-
-       /* first, print out the attribute names */
-       nFields = PQnfields(res);
-       for (i = 0; i &lt; nFields; i++)
-               printf("%-15s", PQfname(res, i));
-       printf("\n\n");
-
-       /* next, print out the rows */
-       for (i = 0; i &lt; PQntuples(res); i++)
-       {
-               for (j = 0; j &lt; nFields; j++)
-                       printf("%-15s", PQgetvalue(res, i, j));
-               printf("\n");
-       }
-
-       PQclear(res);
-
-       /* close the portal ... we don't bother to check for errors ... */
-       res = PQexec(conn, "CLOSE myportal");
-       PQclear(res);
-
-       /* end the transaction */
-       res = PQexec(conn, "END");
-       PQclear(res);
-
-       /* close the connection to the database and cleanup */
-       PQfinish(conn);
-
-       return 0;
+        const char *conninfo;
+        PGconn     *conn;
+        PGresult   *res;
+        int                     nFields;
+        int                     i,
+                                j;
+
+        /*
+         * If the user supplies a parameter on the command line, use it as
+         * the conninfo string; otherwise default to setting dbname=template1
+         * and using environment variables or defaults for all other connection
+         * parameters.
+         */
+        if (argc &gt; 1)
+                conninfo = argv[1];
+        else
+                conninfo = "dbname = template1";
+
+        /* Make a connection to the database */
+        conn = PQconnectdb(conninfo);
+
+        /* Check to see that the backend connection was successfully made */
+        if (PQstatus(conn) != CONNECTION_OK)
+        {
+                fprintf(stderr, "Connection to database '%s' failed.\n", PQdb(conn));
+                fprintf(stderr, "%s", PQerrorMessage(conn));
+                exit_nicely(conn);
+        }
+
+        /*
+         * Our test case here involves using a cursor, for which we must be
+         * inside a transaction block.  We could do the whole thing with a
+         * single PQexec() of "select * from pg_database", but that's too
+         * trivial to make a good example.
+         */
+
+        /* Start a transaction block */
+        res = PQexec(conn, "BEGIN");
+        if (PQresultStatus(res) != PGRES_COMMAND_OK)
+        {
+                fprintf(stderr, "BEGIN command failed: %s", PQerrorMessage(conn));
+                PQclear(res);
+                exit_nicely(conn);
+        }
+
+        /*
+         * Should PQclear PGresult whenever it is no longer needed to avoid
+         * memory leaks
+         */
+        PQclear(res);
+
+        /*
+         * Fetch rows from pg_database, the system catalog of databases
+         */
+        res = PQexec(conn, "DECLARE myportal CURSOR FOR select * from pg_database");
+        if (PQresultStatus(res) != PGRES_COMMAND_OK)
+        {
+                fprintf(stderr, "DECLARE CURSOR failed: %s", PQerrorMessage(conn));
+                PQclear(res);
+                exit_nicely(conn);
+        }
+        PQclear(res);
+
+        res = PQexec(conn, "FETCH ALL in myportal");
+        if (PQresultStatus(res) != PGRES_TUPLES_OK)
+        {
+                fprintf(stderr, "FETCH ALL failed: %s", PQerrorMessage(conn));
+                PQclear(res);
+                exit_nicely(conn);
+        }
+
+        /* first, print out the attribute names */
+        nFields = PQnfields(res);
+        for (i = 0; i &lt; nFields; i++)
+                printf("%-15s", PQfname(res, i));
+        printf("\n\n");
+
+        /* next, print out the rows */
+        for (i = 0; i &lt; PQntuples(res); i++)
+        {
+                for (j = 0; j &lt; nFields; j++)
+                        printf("%-15s", PQgetvalue(res, i, j));
+                printf("\n");
+        }
+
+        PQclear(res);
+
+        /* close the portal ... we don't bother to check for errors ... */
+        res = PQexec(conn, "CLOSE myportal");
+        PQclear(res);
+
+        /* end the transaction */
+        res = PQexec(conn, "END");
+        PQclear(res);
+
+        /* close the connection to the database and cleanup */
+        PQfinish(conn);
+
+        return 0;
 }
 </programlisting>
   </example>
@@ -3701,7 +3864,7 @@ main(int argc, char **argv)
 <programlisting>
 /*
  * testlibpq2.c
- *             Test of the asynchronous notification interface
+ *              Test of the asynchronous notification interface
  *
  * Start this program, then from psql in another window do
  *   NOTIFY TBL2;
@@ -3732,102 +3895,102 @@ main(int argc, char **argv)
 static void
 exit_nicely(PGconn *conn)
 {
-       PQfinish(conn);
-       exit(1);
+        PQfinish(conn);
+        exit(1);
 }
 
 int
 main(int argc, char **argv)
 {
-       const char *conninfo;
-       PGconn     *conn;
-       PGresult   *res;
-       PGnotify   *notify;
-       int                     nnotifies;
-
-       /*
-        * If the user supplies a parameter on the command line, use it as
-        * the conninfo string; otherwise default to setting dbname=template1
-        * and using environment variables or defaults for all other connection
-        * parameters.
-        */
-       if (argc &gt; 1)
-               conninfo = argv[1];
-       else
-               conninfo = "dbname = template1";
-
-       /* Make a connection to the database */
-       conn = PQconnectdb(conninfo);
-
-       /* Check to see that the backend connection was successfully made */
-       if (PQstatus(conn) != CONNECTION_OK)
-       {
-               fprintf(stderr, "Connection to database '%s' failed.\n", PQdb(conn));
-               fprintf(stderr, "%s", PQerrorMessage(conn));
-               exit_nicely(conn);
-       }
-
-       /*
-        * Issue LISTEN command to enable notifications from the rule's NOTIFY.
-        */
-       res = PQexec(conn, "LISTEN TBL2");
-       if (PQresultStatus(res) != PGRES_COMMAND_OK)
-       {
-               fprintf(stderr, "LISTEN command failed: %s", PQerrorMessage(conn));
-               PQclear(res);
-               exit_nicely(conn);
-       }
-
-       /*
-        * should PQclear PGresult whenever it is no longer needed to avoid
-        * memory leaks
-        */
-       PQclear(res);
-
-       /* Quit after four notifies are received. */
-       nnotifies = 0;
-       while (nnotifies &lt; 4)
-       {
-               /*
-                * Sleep until something happens on the connection.  We use select(2)
-                * to wait for input, but you could also use poll() or similar
-                * facilities.
-                */
-               int                     sock;
-               fd_set          input_mask;
-
-               sock = PQsocket(conn);
-
-               if (sock &lt; 0)
-                       break;                          /* shouldn't happen */
-
-               FD_ZERO(&amp;input_mask);
-               FD_SET(sock, &amp;input_mask);
-
-               if (select(sock + 1, &amp;input_mask, NULL, NULL, NULL) &lt; 0)
-               {
-                       fprintf(stderr, "select() failed: %s\n", strerror(errno));
-                       exit_nicely(conn);
-               }
-
-               /* Now check for input */
-               PQconsumeInput(conn);
-               while ((notify = PQnotifies(conn)) != NULL)
-               {
-                       fprintf(stderr,
-                                       "ASYNC NOTIFY of '%s' received from backend pid %d\n",
-                                       notify-&gt;relname, notify-&gt;be_pid);
-                       PQfreemem(notify);
-                       nnotifies++;
-               }
-       }
-
-       fprintf(stderr, "Done.\n");
-
-       /* close the connection to the database and cleanup */
-       PQfinish(conn);
-
-       return 0;
+        const char *conninfo;
+        PGconn     *conn;
+        PGresult   *res;
+        PGnotify   *notify;
+        int                     nnotifies;
+
+        /*
+         * If the user supplies a parameter on the command line, use it as
+         * the conninfo string; otherwise default to setting dbname=template1
+         * and using environment variables or defaults for all other connection
+         * parameters.
+         */
+        if (argc &gt; 1)
+                conninfo = argv[1];
+        else
+                conninfo = "dbname = template1";
+
+        /* Make a connection to the database */
+        conn = PQconnectdb(conninfo);
+
+        /* Check to see that the backend connection was successfully made */
+        if (PQstatus(conn) != CONNECTION_OK)
+        {
+                fprintf(stderr, "Connection to database '%s' failed.\n", PQdb(conn));
+                fprintf(stderr, "%s", PQerrorMessage(conn));
+                exit_nicely(conn);
+        }
+
+        /*
+         * Issue LISTEN command to enable notifications from the rule's NOTIFY.
+         */
+        res = PQexec(conn, "LISTEN TBL2");
+        if (PQresultStatus(res) != PGRES_COMMAND_OK)
+        {
+                fprintf(stderr, "LISTEN command failed: %s", PQerrorMessage(conn));
+                PQclear(res);
+                exit_nicely(conn);
+        }
+
+        /*
+         * should PQclear PGresult whenever it is no longer needed to avoid
+         * memory leaks
+         */
+        PQclear(res);
+
+        /* Quit after four notifies are received. */
+        nnotifies = 0;
+        while (nnotifies &lt; 4)
+        {
+                /*
+                 * Sleep until something happens on the connection.  We use select(2)
+                 * to wait for input, but you could also use poll() or similar
+                 * facilities.
+                 */
+                int                     sock;
+                fd_set          input_mask;
+
+                sock = PQsocket(conn);
+
+                if (sock &lt; 0)
+                        break;                          /* shouldn't happen */
+
+                FD_ZERO(&amp;input_mask);
+                FD_SET(sock, &amp;input_mask);
+
+                if (select(sock + 1, &amp;input_mask, NULL, NULL, NULL) &lt; 0)
+                {
+                        fprintf(stderr, "select() failed: %s\n", strerror(errno));
+                        exit_nicely(conn);
+                }
+
+                /* Now check for input */
+                PQconsumeInput(conn);
+                while ((notify = PQnotifies(conn)) != NULL)
+                {
+                        fprintf(stderr,
+                                        "ASYNC NOTIFY of '%s' received from backend pid %d\n",
+                                        notify-&gt;relname, notify-&gt;be_pid);
+                        PQfreemem(notify);
+                        nnotifies++;
+                }
+        }
+
+        fprintf(stderr, "Done.\n");
+
+        /* close the connection to the database and cleanup */
+        PQfinish(conn);
+
+        return 0;
 }
 </programlisting>
   </example>
@@ -3838,7 +4001,7 @@ main(int argc, char **argv)
 <programlisting>
 /*
  * testlibpq3.c
- *             Test out-of-line parameters and binary I/O.
+ *              Test out-of-line parameters and binary I/O.
  *
  * Before running this, populate a database with the following commands
  * (provided in src/test/examples/testlibpq3.sql):
@@ -3870,125 +4033,125 @@ main(int argc, char **argv)
 static void
 exit_nicely(PGconn *conn)
 {
-       PQfinish(conn);
-       exit(1);
+        PQfinish(conn);
+        exit(1);
 }
 
 int
 main(int argc, char **argv)
 {
-       const char *conninfo;
-       PGconn     *conn;
-       PGresult   *res;
-       const char *paramValues[1];
-       int                     i,
-                               j;
-       int                     i_fnum,
-                               t_fnum,
-                               b_fnum;
-
-       /*
-        * If the user supplies a parameter on the command line, use it as
-        * the conninfo string; otherwise default to setting dbname=template1
-        * and using environment variables or defaults for all other connection
-        * parameters.
-        */
-       if (argc &gt; 1)
-               conninfo = argv[1];
-       else
-               conninfo = "dbname = template1";
-
-       /* Make a connection to the database */
-       conn = PQconnectdb(conninfo);
-
-       /* Check to see that the backend connection was successfully made */
-       if (PQstatus(conn) != CONNECTION_OK)
-       {
-               fprintf(stderr, "Connection to database '%s' failed.\n", PQdb(conn));
-               fprintf(stderr, "%s", PQerrorMessage(conn));
-               exit_nicely(conn);
-       }
-
-       /*
-        * The point of this program is to illustrate use of PQexecParams()
-        * with out-of-line parameters, as well as binary transmission of
-        * results.  By using out-of-line parameters we can avoid a lot of
-        * tedious mucking about with quoting and escaping.  Notice how we
-        * don't have to do anything special with the quote mark in the
-        * parameter value.
-        */
-
-       /* Here is our out-of-line parameter value */
-       paramValues[0] = "joe's place";
-
-       res = PQexecParams(conn,
-                                          "SELECT * FROM test1 WHERE t = $1",
-                                          1,           /* one param */
-                                          NULL,        /* let the backend deduce param type */
-                                          paramValues,
-                                          NULL,        /* don't need param lengths since text */
-                                          NULL,        /* default to all text params */
-                                          1);          /* ask for binary results */
-
-       if (PQresultStatus(res) != PGRES_TUPLES_OK)
-       {
-               fprintf(stderr, "SELECT failed: %s", PQerrorMessage(conn));
-               PQclear(res);
-               exit_nicely(conn);
-       }
-
-       /* Use PQfnumber to avoid assumptions about field order in result */
-       i_fnum = PQfnumber(res, "i");
-       t_fnum = PQfnumber(res, "t");
-       b_fnum = PQfnumber(res, "b");
-
-       for (i = 0; i &lt; PQntuples(res); i++)
-       {
-               char       *iptr;
-               char       *tptr;
-               char       *bptr;
-               int                     blen;
-               int                     ival;
-
-               /* Get the field values (we ignore possibility they are null!) */
-               iptr = PQgetvalue(res, i, i_fnum);
-               tptr = PQgetvalue(res, i, t_fnum);
-               bptr = PQgetvalue(res, i, b_fnum);
-
-               /*
-                * The binary representation of INT4 is in network byte order,
-                * which we'd better coerce to the local byte order.
-                */
-               ival = ntohl(*((uint32_t *) iptr));
-
-               /*
-                * The binary representation of TEXT is, well, text, and since
-                * libpq was nice enough to append a zero byte to it, it'll work
-                * just fine as a C string.
-                *
-                * The binary representation of BYTEA is a bunch of bytes, which
-                * could include embedded nulls so we have to pay attention to
-                * field length.
-                */
-               blen = PQgetlength(res, i, b_fnum);
-
-               printf("tuple %d: got\n", i);
-               printf(" i = (%d bytes) %d\n",
-                          PQgetlength(res, i, i_fnum), ival);
-               printf(" t = (%d bytes) '%s'\n",
-                          PQgetlength(res, i, t_fnum), tptr);
-               printf(" b = (%d bytes) ", blen);
-               for (j = 0; j &lt; blen; j++)
-                       printf("\\%03o", bptr[j]);
-               printf("\n\n");
-       }
-
-       PQclear(res);
-
-       /* close the connection to the database and cleanup */
-       PQfinish(conn);
-
-       return 0;
+        const char *conninfo;
+        PGconn     *conn;
+        PGresult   *res;
+        const char *paramValues[1];
+        int                     i,
+                                j;
+        int                     i_fnum,
+                                t_fnum,
+                                b_fnum;
+
+        /*
+         * If the user supplies a parameter on the command line, use it as
+         * the conninfo string; otherwise default to setting dbname=template1
+         * and using environment variables or defaults for all other connection
+         * parameters.
+         */
+        if (argc &gt; 1)
+                conninfo = argv[1];
+        else
+                conninfo = "dbname = template1";
+
+        /* Make a connection to the database */
+        conn = PQconnectdb(conninfo);
+
+        /* Check to see that the backend connection was successfully made */
+        if (PQstatus(conn) != CONNECTION_OK)
+        {
+                fprintf(stderr, "Connection to database '%s' failed.\n", PQdb(conn));
+                fprintf(stderr, "%s", PQerrorMessage(conn));
+                exit_nicely(conn);
+        }
+
+        /*
+         * The point of this program is to illustrate use of PQexecParams()
+         * with out-of-line parameters, as well as binary transmission of
+         * results.  By using out-of-line parameters we can avoid a lot of
+         * tedious mucking about with quoting and escaping.  Notice how we
+         * don't have to do anything special with the quote mark in the
+         * parameter value.
+         */
+
+        /* Here is our out-of-line parameter value */
+        paramValues[0] = "joe's place";
+
+        res = PQexecParams(conn,
+                                           "SELECT * FROM test1 WHERE t = $1",
+                                           1,           /* one param */
+                                           NULL,        /* let the backend deduce param type */
+                                           paramValues,
+                                           NULL,        /* don't need param lengths since text */
+                                           NULL,        /* default to all text params */
+                                           1);          /* ask for binary results */
+
+        if (PQresultStatus(res) != PGRES_TUPLES_OK)
+        {
+                fprintf(stderr, "SELECT failed: %s", PQerrorMessage(conn));
+                PQclear(res);
+                exit_nicely(conn);
+        }
+
+        /* Use PQfnumber to avoid assumptions about field order in result */
+        i_fnum = PQfnumber(res, "i");
+        t_fnum = PQfnumber(res, "t");
+        b_fnum = PQfnumber(res, "b");
+
+        for (i = 0; i &lt; PQntuples(res); i++)
+        {
+                char       *iptr;
+                char       *tptr;
+                char       *bptr;
+                int                     blen;
+                int                     ival;
+
+                /* Get the field values (we ignore possibility they are null!) */
+                iptr = PQgetvalue(res, i, i_fnum);
+                tptr = PQgetvalue(res, i, t_fnum);
+                bptr = PQgetvalue(res, i, b_fnum);
+
+                /*
+                 * The binary representation of INT4 is in network byte order,
+                 * which we'd better coerce to the local byte order.
+                 */
+                ival = ntohl(*((uint32_t *) iptr));
+
+                /*
+                 * The binary representation of TEXT is, well, text, and since
+                 * libpq was nice enough to append a zero byte to it, it'll work
+                 * just fine as a C string.
+                 *
+                 * The binary representation of BYTEA is a bunch of bytes, which
+                 * could include embedded nulls so we have to pay attention to
+                 * field length.
+                 */
+                blen = PQgetlength(res, i, b_fnum);
+
+                printf("tuple %d: got\n", i);
+                printf(" i = (%d bytes) %d\n",
+                           PQgetlength(res, i, i_fnum), ival);
+                printf(" t = (%d bytes) '%s'\n",
+                           PQgetlength(res, i, t_fnum), tptr);
+                printf(" b = (%d bytes) ", blen);
+                for (j = 0; j &lt; blen; j++)
+                        printf("\\%03o", bptr[j]);
+                printf("\n\n");
+        }
+
+        PQclear(res);
+
+        /* close the connection to the database and cleanup */
+        PQfinish(conn);
+
+        return 0;
 }
 </programlisting>
   </example>
index 019c715c25fa75f7bc38a74443b8eaedfc9d32e0..c41c7571a61e756fd8873a981c63aa34b0de05fa 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.29 2003/06/21 21:51:33 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.29.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
  <chapter id="largeObjects">
@@ -113,6 +113,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.29 2003/06/21 21:51:33 tgl Ex
 <synopsis>
 Oid lo_creat(PGconn *conn, int mode);
 </synopsis>
+     <indexterm><primary>lo_creat</></>
      creates a new large  object.  
      <replaceable class="parameter">mode</replaceable>  is  a  bit mask
      describing  several  different  attributes  of  the new
@@ -143,7 +144,8 @@ inv_oid = lo_creat(INV_READ|INV_WRITE);
 <synopsis>
 Oid lo_import(PGconn *conn, const char *filename);
 </synopsis>
-    <replaceable class="parameter">filename</replaceable> 
+     <indexterm><primary>lo_import</></>
+     <replaceable class="parameter">filename</replaceable> 
      specifies the operating system name of
      the file to be imported as a large object.
      The return value is the OID that was assigned to the new large object.
@@ -159,6 +161,7 @@ Oid lo_import(PGconn *conn, const char *filename);
 <synopsis>
 int lo_export(PGconn *conn, Oid lobjId, const char *filename);
 </synopsis>
+     <indexterm><primary>lo_export</></>
      The <parameter>lobjId</parameter> argument specifies  the  OID  of  the  large
      object  to  export  and the <parameter>filename</parameter> argument specifies
      the operating system name name of the file.
@@ -173,6 +176,7 @@ int lo_export(PGconn *conn, Oid lobjId, const char *filename);
 <synopsis>
 int lo_open(PGconn *conn, Oid lobjId, int mode);
 </synopsis>
+     <indexterm><primary>lo_open</></>
      The <parameter>lobjId</parameter> argument specifies  the  OID  of  the  large
      object  to  open.   The  <parameter>mode</parameter>  bits control whether the
      object is opened  for  reading  (<symbol>INV_READ</>),  writing (<symbol>INV_WRITE</symbol>),  or
@@ -194,10 +198,13 @@ int lo_open(PGconn *conn, Oid lobjId, int mode);
 <synopsis>
 int lo_write(PGconn *conn, int fd, const char *buf, size_t len);
 </synopsis>
-     writes <parameter>len</parameter> bytes from <parameter>buf</parameter> to large object <parameter>fd</>.   The <parameter>fd</parameter>
-     argument must have been returned by a previous <function>lo_open</function>.
-     The number of bytes actually written is  returned.   In
-     the event of an error, the return value is negative.
+     <indexterm><primary>lo_write</></> writes
+     <parameter>len</parameter> bytes from <parameter>buf</parameter>
+     to large object <parameter>fd</>.  The <parameter>fd</parameter>
+     argument must have been returned by a previous
+     <function>lo_open</function>.  The number of bytes actually
+     written is returned.  In the event of an error, the return value
+     is negative.
 </para>
 </sect2>
 
@@ -209,10 +216,13 @@ int lo_write(PGconn *conn, int fd, const char *buf, size_t len);
 <synopsis>
 int lo_read(PGconn *conn, int fd, char *buf, size_t len);
 </synopsis>
-     reads <parameter>len</parameter> bytes from large object <parameter>fd</parameter> into <parameter>buf</parameter>. The  <parameter>fd</parameter>
-     argument must have been returned by a previous <function>lo_open</function>.
-     The number of bytes actually read is returned. In
-     the event of an error, the return value is negative.
+     <indexterm><primary>lo_read</></> reads
+     <parameter>len</parameter> bytes from large object
+     <parameter>fd</parameter> into <parameter>buf</parameter>. The
+     <parameter>fd</parameter> argument must have been returned by a
+     previous <function>lo_open</function>.  The number of bytes
+     actually read is returned. In the event of an error, the return
+     value is negative.
 </para>
 </sect2>
 
@@ -225,10 +235,14 @@ int lo_read(PGconn *conn, int fd, char *buf, size_t len);
 <synopsis>
 int lo_lseek(PGconn *conn, int fd, int offset, int whence);
 </synopsis>
-     This function moves the current location pointer for the
-     large object described by <parameter>fd</> to the new location specified 
-     by <parameter>offset</>.  The valid values for <parameter>whence</> are
-     <symbol>SEEK_SET</> (seek from object start), <symbol>SEEK_CUR</> (seek from current position), and <symbol>SEEK_END</> (seek from object end).  The return value is the new location pointer.
+     <indexterm><primary>lo_lseek</></> This function moves the
+     current location pointer for the large object described by
+     <parameter>fd</> to the new location specified by
+     <parameter>offset</>.  The valid values for <parameter>whence</>
+     are <symbol>SEEK_SET</> (seek from object start),
+     <symbol>SEEK_CUR</> (seek from current position), and
+     <symbol>SEEK_END</> (seek from object end).  The return value is
+     the new location pointer.
 </para>
 </sect2>
 
@@ -241,7 +255,8 @@ int lo_lseek(PGconn *conn, int fd, int offset, int whence);
 <synopsis>
 int lo_tell(PGconn *conn, int fd);
 </synopsis>
-     If there is an error, the return value is negative.
+     <indexterm><primary>lo_tell</></> If there is an error, the
+     return value is negative.
 </para>
 </sect2>
 
@@ -253,9 +268,10 @@ int lo_tell(PGconn *conn, int fd);
 <synopsis>
 int lo_close(PGconn *conn, int fd);
 </synopsis>
-     where  <parameter>fd</>  is  a  large  object  descriptor returned by
-     <function>lo_open</function>.  On success, <function>lo_close</function>
-      returns zero.  On error, the return value is negative.
+     <indexterm><primary>lo_close</></> where <parameter>fd</> is a
+     large object descriptor returned by <function>lo_open</function>.
+     On success, <function>lo_close</function> returns zero.  On
+     error, the return value is negative.
 </para>
 
 <para>
@@ -272,8 +288,10 @@ int lo_close(PGconn *conn, int fd);
 <synopsis>
 int lo_unlink(PGconn *conn, Oid lobjId);
 </synopsis>
-     The <parameter>lobjId</parameter> argument specifies  the  OID  of  the  large
-     object  to  remove.  In the event of an error, the return value is negative.
+     <indexterm><primary>lo_unlink</></> The
+     <parameter>lobjId</parameter> argument specifies the OID of the
+     large object to remove.  In the event of an error, the return
+     value is negative.
     </para>
    </sect2>
 
@@ -284,11 +302,13 @@ int lo_unlink(PGconn *conn, Oid lobjId);
 <title>Server-side Functions</title>
 
 <para>
-     There  are two built-in server-side functions, <function>lo_import</function>
-     and <function>lo_export</function>, for large object access, which are available for use
-    in  <acronym>SQL</acronym>
-     commands.
-     Here is an example of their use:
+     There are two built-in server-side functions,
+     <function>lo_import</function><indexterm><primary>lo_import</></>
+     and
+     <function>lo_export</function>,<indexterm><primary>lo_export</></>
+     for large object access, which are available for use in
+     <acronym>SQL</acronym> commands.  Here is an example of their
+     use:
 <programlisting>
 CREATE TABLE image (
     name            text,
index 122137ad2b9654c9e97a8834836043c53456b34c..4404c5e929ea1a1ddc40fef8c254ff6637fbceef 100644 (file)
@@ -1,10 +1,14 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.23 2003/06/18 12:19:11 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.23.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
 <chapter id="maintenance">
  <title>Routine Database Maintenance Tasks</title>
 
+ <indexterm zone="maintenance">
+  <primary>maintenance</primary>
+ </indexterm>
+
   <para>
    There are a few routine maintenance chores that must be performed on
    a regular basis to keep a <productname>PostgreSQL</productname>
@@ -158,6 +162,15 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.23 2003/06/18 12:19:11
   <sect2 id="vacuum-for-statistics">
    <title>Updating planner statistics</title>
 
+   <indexterm zone="vacuum-for-statistics">
+    <primary>statistics</primary>
+    <secondary>of the planner</secondary>
+   </indexterm>
+
+   <indexterm zone="vacuum-for-statistics">
+    <primary>ANALYZE</primary>
+   </indexterm>
+
    <para>
     The <productname>PostgreSQL</productname> query planner relies on
     statistical information about the contents of tables in order to
@@ -396,7 +409,8 @@ VACUUM
   <title>Log File Maintenance</title>
 
   <indexterm zone="logfile-maintenance">
-   <primary>log files</primary>
+   <primary>server log</primary>
+   <secondary>log file maintenance</secondary>
   </indexterm>
 
   <para>
index dd0b390230c5fa999341977af8bf78783cdffec6..c55f78f5cb7aed8c9343fc6fecf7b0585fc1b1de 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.27 2003/03/25 16:15:37 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.27.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
 <chapter id="managing-databases">
@@ -19,6 +19,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.27 2003/03/25 16:15:37 p
  <sect1 id="manage-ag-overview">
   <title>Overview</title>
 
+  <indexterm zone="manage-ag-overview">
+   <primary>schema</primary>
+  </indexterm>
+
   <para>
    A database is a named collection of <acronym>SQL</acronym> objects
    (<quote>database objects</quote>).  Generally, every database
@@ -70,8 +74,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.27 2003/03/25 16:15:37 p
   </para>
 
   <para>
-   Databases are created with the SQL command
-   <command>CREATE DATABASE</command>:
+   Databases are created with the SQL command <command>CREATE
+   DATABASE</command>:<indexterm><primary>CREATE DATABASE</></>
 <synopsis>
 CREATE DATABASE <replaceable>name</>;
 </synopsis>
@@ -93,9 +97,10 @@ CREATE DATABASE <replaceable>name</>;
    question remains how the <emphasis>first</> database at any given
    site can be created. The first database is always created by the
    <command>initdb</> command when the data storage area is
-   initialized. (See <xref linkend="creating-cluster">.)
-   This database is called <literal>template1</>. So to create the
-   first <quote>real</> database you can connect to
+   initialized. (See <xref linkend="creating-cluster">.)  This
+   database is called
+   <literal>template1</>.<indexterm><primary>template1</></> So to
+   create the first <quote>real</> database you can connect to
    <literal>template1</>.
   </para>
 
@@ -112,7 +117,7 @@ CREATE DATABASE <replaceable>name</>;
   <para>
    As an extra convenience, there is also a program that you can
    execute from the shell to create new databases,
-   <command>createdb</>.
+   <command>createdb</>.<indexterm><primary>createdb</></>
 
 <synopsis>
 createdb <replaceable class="parameter">dbname</replaceable>
@@ -157,31 +162,33 @@ createdb -O <replaceable>username</> <replaceable>dbname</>
   <para>
    <command>CREATE DATABASE</> actually works by copying an existing
    database.  By default, it copies the standard system database named
-   <literal>template1</>.  Thus that database is the <quote>template</>
-   from which new databases are made.  If you add objects to
-   <literal>template1</>, these objects 
+   <literal>template1</>.<indexterm><primary>template1</></> Thus that
+   database is the <quote>template</> from which new databases are
+   made.  If you add objects to <literal>template1</>, these objects
    will be copied into subsequently created user databases.  This
    behavior allows site-local modifications to the standard set of
    objects in databases.  For example, if you install the procedural
    language <application>PL/pgSQL</> in <literal>template1</>, it will
-   automatically be available in user databases without any extra action
-   being taken when those databases are made.
+   automatically be available in user databases without any extra
+   action being taken when those databases are made.
   </para>
 
   <para>
-   There is a second standard system database named <literal>template0</>.
-   This database contains the same data as the initial contents of
-   <literal>template1</>, that is, only the standard objects predefined by
-   your version of <productname>PostgreSQL</productname>.
-     <literal>template0</> should never be changed 
-   after <command>initdb</>.  By instructing <command>CREATE DATABASE</> to
-   copy <literal>template0</> instead of <literal>template1</>, you can
-   create a <quote>virgin</> user database that contains none of the
-   site-local additions in <literal>template1</>.  This is particularly
-   handy when restoring a <literal>pg_dump</> dump: the dump script should
-   be restored in a virgin database to ensure that one recreates the
-   correct contents of the dumped database, without any conflicts with
-   additions that may now be present in <literal>template1</>.
+   There is a second standard system database named
+   <literal>template0</>.<indexterm><primary>template0</></> This
+   database contains the same data as the initial contents of
+   <literal>template1</>, that is, only the standard objects
+   predefined by your version of
+   <productname>PostgreSQL</productname>.  <literal>template0</>
+   should never be changed after <command>initdb</>.  By instructing
+   <command>CREATE DATABASE</> to copy <literal>template0</> instead
+   of <literal>template1</>, you can create a <quote>virgin</> user
+   database that contains none of the site-local additions in
+   <literal>template1</>.  This is particularly handy when restoring a
+   <literal>pg_dump</> dump: the dump script should be restored in a
+   virgin database to ensure that one recreates the correct contents
+   of the dumped database, without any conflicts with additions that
+   may now be present in <literal>template1</>.
   </para>
 
   <para>
@@ -214,7 +221,7 @@ createdb -T template0 <replaceable>dbname</>
   </para>
 
   <para>
-   Two useful flags exist in <literal>pg_database</literal> for each
+   Two useful flags exist in <literal>pg_database</literal><indexterm><primary>pg_database</></> for each
    database: the columns <literal>datistemplate</literal> and
    <literal>datallowconn</literal>.  <literal>datistemplate</literal>
    may be set to indicate that a database is intended as a template for
@@ -382,7 +389,8 @@ gmake CPPFLAGS=-DALLOW_ABSOLUTE_DBPATHS all
   <title>Destroying a Database</title>
 
   <para>
-   Databases are destroyed with the command <command>DROP DATABASE</command>:
+   Databases are destroyed with the command <command>DROP
+   DATABASE</command>:<indexterm><primary>DROP DATABASE</></>
 <synopsis>
 DROP DATABASE <replaceable>name</>;
 </synopsis>
@@ -403,7 +411,8 @@ DROP DATABASE <replaceable>name</>;
   </para>
 
   <para>
-   For convenience, there is also a shell program to drop databases:
+   For convenience, there is also a shell program to drop
+   databases:<indexterm><primary>dropdb</></>
 <synopsis>
 dropdb <replaceable class="parameter">dbname</replaceable>
 </synopsis>
index 90a77d0a2c8d923deb6ecc1d7acbdd7162e7fd95..03ca970c768440dd61ec8313d074d647fd7730e9 100644 (file)
@@ -1,10 +1,20 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v 1.20 2003/04/04 03:03:53 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v 1.20.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
 <chapter id="monitoring">
  <title>Monitoring Database Activity</title>
 
+ <indexterm zone="monitoring">
+  <primary>monitoring</primary>
+  <secondary>database activity</secondary>
+ </indexterm>
+
+ <indexterm zone="monitoring">
+  <primary>database activity</primary>
+  <secondary>monitoring</secondary>
+ </indexterm>
+
  <para>
   A database administrator frequently wonders, <quote>What is the system
   doing right now?</quote>
@@ -589,6 +599,11 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
  <sect1 id="monitoring-locks">
   <title>Viewing Locks</title>
 
+  <indexterm zone="monitoring-locks">
+   <primary>lock</primary>
+   <secondary>monitoring</secondary>
+  </indexterm>
+
   <para>
    Another useful tool for monitoring database activity is the
    <literal>pg_locks</literal> system table.  It allows the
index b5cda133ef221f6fa316d9e7d89b2314d8326028..077b0c3219c33df9a01453afd71dfcf0e2da0054 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.35 2003/03/25 16:15:37 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.35.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
  <chapter id="mvcc">
@@ -22,6 +22,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.35 2003/03/25 16:15:37 petere
   <sect1 id="mvcc-intro">
    <title>Introduction</title>
 
+   <indexterm>
+    <primary>MVCC</primary>
+   </indexterm>
+
    <para>
     Unlike traditional database systems which use locks for concurrency control,
     <productname>PostgreSQL</productname>
@@ -57,6 +61,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.35 2003/03/25 16:15:37 petere
   <sect1 id="transaction-iso">
    <title>Transaction Isolation</title>
 
+   <indexterm>
+    <primary>transaction isolation</primary>
+   </indexterm>
+
    <para>
     The <acronym>SQL</acronym> standard defines four levels of
     transaction isolation in terms of three phenomena that must be
@@ -108,7 +116,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.35 2003/03/25 16:15:37 petere
 
    <para>
     <indexterm>
-     <primary>isolation levels</primary>
+     <primary>transaction isolation level</primary>
     </indexterm>
     The four transaction isolation levels and the corresponding
     behaviors are described in <xref linkend="mvcc-isolevel-table">.
@@ -206,7 +214,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.35 2003/03/25 16:15:37 petere
    <title>Read Committed Isolation Level</title>
 
    <indexterm>
-    <primary>isolation levels</primary>
+    <primary>transaction isolation level</primary>
     <secondary>read committed</secondary>
    </indexterm>
 
@@ -292,7 +300,7 @@ COMMIT;
    <title>Serializable Isolation Level</title>
 
    <indexterm>
-    <primary>isolation levels</primary>
+    <primary>transaction isolation level</primary>
     <secondary>serializable</secondary>
    </indexterm>
 
@@ -376,7 +384,7 @@ ERROR:  Can't serialize access due to concurrent update
    <title>Explicit Locking</title>
 
    <indexterm>
-    <primary>locking</primary>
+    <primary>lock</primary>
    </indexterm>
 
    <para>
@@ -394,6 +402,10 @@ ERROR:  Can't serialize access due to concurrent update
   <sect2 id="locking-tables">
    <title>Table-Level Locks</title>
 
+   <indexterm zone="locking-tables">
+    <primary>LOCK</primary>
+   </indexterm>
+
    <para>
     The list below shows the available lock modes and the contexts in
     which they are used automatically by
@@ -644,6 +656,10 @@ ERROR:  Can't serialize access due to concurrent update
    <sect2 id="locking-deadlocks">
     <title>Deadlocks</title>
 
+    <indexterm zone="locking-deadlocks">
+     <primary>deadlock</primary>
+    </indexterm>
+
     <para>
      The use of explicit locking can increase the likelyhood of
      <firstterm>deadlocks</>, wherein two (or more) transactions each
@@ -813,6 +829,11 @@ UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 22222;
   <sect1 id="locking-indexes">
    <title>Locking and Indexes</title>
 
+   <indexterm zone="locking-indexes">
+    <primary>index</primary>
+    <secondary>locks</secondary>
+   </indexterm>
+
    <para>
     Though <productname>PostgreSQL</productname>
     provides nonblocking read/write access to table
index 0de183a01e04837f4329458e11caca200208758b..fa887a406e45deeb008037bbcc971048f6bfb883 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.30 2003/06/25 02:07:33 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.30.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
  <chapter id="performance-tips">
@@ -15,6 +15,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.30 2003/06/25 02:07:33 mom
   <sect1 id="using-explain">
    <title>Using <command>EXPLAIN</command></title>
 
+   <indexterm zone="using-explain">
+    <primary>EXPLAIN</primary>
+   </indexterm>
+
+   <indexterm zone="using-explain">
+    <primary>query plan</primary>
+   </indexterm>
+
    <para>
     <productname>PostgreSQL</productname> devises a <firstterm>query
     plan</firstterm> for each query it is given.  Choosing the right
@@ -336,6 +344,11 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 &lt; 50 AND t1
  <sect1 id="planner-stats">
   <title>Statistics Used by the Planner</title>
 
+  <indexterm zone="planner-stats">
+   <primary>statistics</primary>
+   <secondary>of the planner</secondary>
+  </indexterm>
+
   <para>
    As we saw in the previous section, the query planner needs to estimate
    the number of rows retrieved by a query in order to make good choices
@@ -381,6 +394,10 @@ SELECT relname, relkind, reltuples, relpages FROM pg_class WHERE relname LIKE 't
    since it does not read every row of the table.
   </para>
 
+  <indexterm>
+   <primary>pg_statistic</primary>
+  </indexterm>
+
   <para>
    Most queries retrieve only a fraction of the rows in a table, due
    to having <literal>WHERE</> clauses that restrict the rows to be examined.
@@ -393,6 +410,10 @@ SELECT relname, relkind, reltuples, relpages FROM pg_class WHERE relname LIKE 't
    and are always approximate even when freshly updated.
   </para>
 
+  <indexterm>
+   <primary>pg_stats</primary>
+  </indexterm>
+
   <para>
    Rather than look at <structname>pg_statistic</structname> directly,
    it's better to look at its view <structname>pg_stats</structname>
@@ -538,6 +559,11 @@ SELECT attname, n_distinct, most_common_vals FROM pg_stats WHERE tablename = 'ro
  <sect1 id="explicit-joins">
   <title>Controlling the Planner with Explicit <literal>JOIN</> Clauses</title>
 
+  <indexterm zone="explicit-joins">
+   <primary>join</primary>
+   <secondary>controlling the order</secondary>
+  </indexterm>
+
   <para>
    It is possible
    to control the query planner to some extent by using the explicit <literal>JOIN</>
@@ -700,6 +726,10 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
   <sect2 id="disable-autocommit">
    <title>Disable Autocommit</title>
 
+   <indexterm zone="disable-autocommit">
+    <primary>autocommit</primary>
+   </indexterm>
+
    <para>
     Turn off autocommit and just do one commit at
     the end.  (In plain SQL, this means issuing <command>BEGIN</command>
index 02d38bc53403442a5e665a54fe46ef02f8655835..55eb99a439ab93ef2c3042903c78d21bcd04db97 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.19 2003/04/07 01:29:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.19.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
  <chapter id="plperl">
@@ -73,11 +73,12 @@ CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS '
   </para>
 
   <para>
-   If an SQL null value is passed to a function, the argument value
-   will appear as <quote>undefined</> in Perl.  The above function
-   definition will not behave very nicely with null inputs (in fact,
-   it will act as though they are zeroes).  We could add
-   <literal>STRICT</> to the function definition to make
+   If an SQL null value<indexterm><primary>null value</><secondary
+   sortas="PL/Perl">in PL/Perl</></indexterm> is passed to a function,
+   the argument value will appear as <quote>undefined</> in Perl.  The
+   above function definition will not behave very nicely with null
+   inputs (in fact, it will act as though they are zeroes).  We could
+   add <literal>STRICT</> to the function definition to make
    <productname>PostgreSQL</productname> do something more reasonable:
    if a null value is passed, the function will not be called at all,
    but will just return a null result automatically.  Alternatively,
@@ -170,7 +171,7 @@ SELECT name, empcomp(employee) FROM employee;
    mirror sites</ulink>). This module makes available a
    <acronym>DBI</>-compliant database-handle named
    <varname>$pg_dbh</varname> that can be used to perform queries
-   with normal <acronym>DBI</> syntax.
+   with normal <acronym>DBI</> syntax.<indexterm><primary>DBI</></indexterm>
   </para>
 
   <para>
@@ -180,7 +181,7 @@ SELECT name, empcomp(employee) FROM employee;
     <varlistentry>
      <indexterm>
       <primary>elog</primary>
-      <secondary>PL/Perl</secondary>
+      <secondary>in PL/Perl</secondary>
      </indexterm>
 
      <term><function>elog</> <replaceable>level</replaceable>, <replaceable>msg</replaceable></term>
@@ -202,6 +203,11 @@ SELECT name, empcomp(employee) FROM employee;
  <sect1 id="plperl-trusted">
   <title>Trusted and Untrusted PL/Perl</title>
 
+  <indexterm zone="plperl-trusted">
+   <primary>trusted</primary>
+   <secondary>PL/Perl</secondary>
+  </indexterm>
+
   <para>
    Normally, PL/Perl is installed as a <quote>trusted</> programming
    language named <literal>plperl</>.  In this setup, certain Perl
@@ -231,13 +237,14 @@ CREATE FUNCTION badfunc() RETURNS integer AS '
 
   <para>
    Sometimes it is desirable to write Perl functions that are not
-   restricted.  For example, one might want a Perl function that
-   sends mail.  To handle these cases, PL/Perl can also be installed
-   as an <quote>untrusted</> language (usually called
-   <application>PL/PerlU</application>).  In this case the full Perl language is
-   available.  If the <command>createlang</command> program is used to
-   install the language, the language name <literal>plperlu</literal>
-   will select the untrusted PL/Perl variant.
+   restricted.  For example, one might want a Perl function that sends
+   mail.  To handle these cases, PL/Perl can also be installed as an
+   <quote>untrusted</> language (usually called
+   <application>PL/PerlU</application><indexterm><primary>PL/PerlU</></indexterm>).
+   In this case the full Perl language is available.  If the
+   <command>createlang</command> program is used to install the
+   language, the language name <literal>plperlu</literal> will select
+   the untrusted PL/Perl variant.
   </para>
 
   <para>
@@ -272,7 +279,9 @@ CREATE FUNCTION badfunc() RETURNS integer AS '
 
     <listitem>
      <para>
-      PL/Perl cannot be used to write trigger functions.
+      PL/Perl cannot be used to write trigger
+      functions.<indexterm><primary>trigger</><secondary>in
+      PL/Perl</></indexterm>
      </para>
     </listitem>
 
index b313860ea0c39bbcab6cc48289cf8d480d1dc2c3..c616cec5cdc8986ba23eaa68fd9edc59a8e012b3 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.20 2003/08/09 22:50:22 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.20.2.1 2003/09/07 04:36:42 momjian Exp $
 -->
 
 <chapter id="plpgsql"> 
@@ -63,20 +63,22 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.20 2003/08/09 22:50:22 tgl
    </para>
 
    <para>
-    As each expression and <acronym>SQL</acronym> command is first used
-       in the function, the <application>PL/pgSQL</> interpreter creates
-       a prepared execution plan (using the <acronym>SPI</acronym>
-       manager's <function>SPI_prepare</function> and
-       <function>SPI_saveplan</function> functions).  Subsequent visits
-       to that expression or command reuse the prepared plan.  Thus, a
-       function with conditional code that contains many statements for
-       which execution plans might be required will only prepare and save
-       those plans that are really used during the lifetime of the
-       database connection.  This can substantially reduce the total
-       amount of time required to parse, and generate execution plans for the
-       statements in a <application>PL/pgSQL</> function. A disadvantage is
-       that errors in a specific expression or command may not be detected
-       until that part of the function is reached in execution.
+    As each expression and <acronym>SQL</acronym> command is first
+    used in the function, the <application>PL/pgSQL</> interpreter
+    creates a prepared execution plan (using the
+    <acronym>SPI</acronym> manager's <function>SPI_prepare</function>
+    and <function>SPI_saveplan</function>
+    functions).<indexterm><primary>preparing a query</><secondary>in
+    PL/pgSQL</></> Subsequent visits to that expression or command
+    reuse the prepared plan.  Thus, a function with conditional code
+    that contains many statements for which execution plans might be
+    required will only prepare and save those plans that are really
+    used during the lifetime of the database connection.  This can
+    substantially reduce the total amount of time required to parse,
+    and generate execution plans for the statements in a
+    <application>PL/pgSQL</> function. A disadvantage is that errors
+    in a specific expression or command may not be detected until that
+    part of the function is reached in execution.
    </para>
 
    <para>
@@ -196,7 +198,7 @@ END;
      and return the <quote>polymorphic</> types
      <type>anyelement</type> and <type>anyarray</type>.  The actual
      datatypes handled by a polymorphic function can vary from call to
-     call, as discussed in <xref linkend="types-polymorphic">.
+     call, as discussed in <xref linkend="extend-types-polymorphic">.
      An example is shown in <xref linkend="plpgsql-declaration-aliases">.
     </para>
 
@@ -563,7 +565,7 @@ END;
       or <type>anyarray</type>), a special parameter <literal>$0</literal>
       is created.  Its datatype is the actual return type of the function,
       as deduced from the actual input types (see <xref
-      linkend="types-polymorphic">).
+      linkend="extend-types-polymorphic">).
       This allows the function to access its actual return type
       as shown in <xref linkend="plpgsql-declaration-type">.
       <literal>$0</literal> is initialized to NULL and can be modified by
@@ -903,6 +905,11 @@ tax := subtotal * 0.06;
    <sect2 id="plpgsql-select-into">
     <title><command>SELECT INTO</command></title>
 
+    <indexterm zone="plpgsql-select-into">
+     <primary>SELECT INTO</primary>
+     <secondary>in PL/pgSQL</secondary>
+    </indexterm>
+
     <para>
      The result of a <command>SELECT</command> command yielding multiple columns (but
      only one row) can be assigned to a record variable, row-type
@@ -1097,14 +1104,16 @@ EXECUTE ''UPDATE tbl SET ''
     <para>
      This example shows use of the functions
      <function>quote_ident(<type>text</type>)</function> and
-     <function>quote_literal(<type>text</type>)</function>.
-     Variables containing column and table identifiers should be
-     passed to function <function>quote_ident</function>.
-     Variables containing values that should be literal strings in the
-     constructed command should be passed to
-     <function>quote_literal</function>.  Both take the
-     appropriate steps to return the input text enclosed in double
-     or single quotes respectively, with any embedded special characters
+     <function>quote_literal(<type>text</type>)</function>.<indexterm><primary>quote_ident</><secondary>use
+     in
+     PL/pgSQL</></indexterm><indexterm><primary>quote_literal</><secondary>use
+     in PL/pgSQL</></indexterm> Variables containing column and table
+     identifiers should be passed to function
+     <function>quote_ident</function>.  Variables containing values
+     that should be literal strings in the constructed command should
+     be passed to <function>quote_literal</function>.  Both take the
+     appropriate steps to return the input text enclosed in double or
+     single quotes respectively, with any embedded special characters
      properly escaped.
     </para>
 
@@ -1517,6 +1526,11 @@ END IF;
    <sect2 id="plpgsql-control-structures-loops">
     <title>Simple Loops</title>
 
+    <indexterm zone="plpgsql-control-structures-loops">
+     <primary>loop</primary>
+     <secondary>in PL/pgSQL</secondary>
+    </indexterm>
+
     <para>
      With the <literal>LOOP</>, <literal>EXIT</>, <literal>WHILE</>,
      and <literal>FOR</> statements, you can arrange for your
@@ -1655,6 +1669,11 @@ FOR i IN REVERSE 10..1 LOOP
 END LOOP;
 </programlisting>
        </para>
+
+       <para>
+        If the lower bound is greater than the upper bound, the loop body is not
+        executed at all, but no error is raised.
+       </para>
      </sect3>
    </sect2>
 
@@ -1734,6 +1753,11 @@ END LOOP;
   <sect1 id="plpgsql-cursors">
    <title>Cursors</title>
 
+   <indexterm zone="plpgsql-cursors">
+    <primary>cursor</primary>
+    <secondary>in PL/pgSQL</secondary>
+   </indexterm>
+
    <para>
     Rather than executing a whole query at once, it is possible to set
     up a <firstterm>cursor</> that encapsulates the query, and then read
@@ -2096,6 +2120,11 @@ RAISE EXCEPTION ''Inexistent ID --> %'', user_id;
  <sect1 id="plpgsql-trigger">
   <title>Trigger Procedures</title>
 
+  <indexterm zone="plpgsql-trigger">
+   <primary>trigger</primary>
+   <secondary>in PL/pgSQL</secondary>
+  </indexterm>
+
   <para>
        <application>PL/pgSQL</application> can be used to define trigger
        procedures. A trigger procedure is created with the
@@ -2302,10 +2331,12 @@ CREATE TRIGGER emp_stamp BEFORE INSERT OR UPDATE ON emp
 
   <indexterm zone="plpgsql-porting">
    <primary>Oracle</primary>
+   <secondary>porting from PL/SQL to PL/pgSQL</secondary>
   </indexterm>
 
   <indexterm zone="plpgsql-porting">
-   <primary>PL/SQL</primary>
+   <primary>PL/SQL (Oracle)</primary>
+   <secondary>porting to PL/pgSQL</secondary>
   </indexterm>
 
   <para>
@@ -2546,7 +2577,8 @@ END;
     with <literal>OUT</> parameters and string manipulation.
     <productname>PostgreSQL</> does not have an
     <function>instr</function> function, but you can work around it
-    using a combination of other functions.  In <xref
+    using a combination of other
+    functions.<indexterm><primary>instr</></indexterm> In <xref
     linkend="plpgsql-porting-appendix"> there is a
     <application>PL/pgSQL</application> implementation of
     <function>instr</function> that you can use to make your porting
index 0a101384ee79b5800748d0c4e554d3886122f801..8d476a7a43a70472a90a755b49822d9b79faba35 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.18 2003/07/01 13:52:29 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.18.2.1 2003/09/07 04:36:43 momjian Exp $ -->
 
 <chapter id="plpython">
  <title>PL/Python - Python Procedural Language</title>
@@ -68,9 +68,10 @@ def __plpython_procedure_myfunc_23456():
 
   <para>
    If you do not provide a return value, Python returns the default
-   <symbol>None</symbol>. The
-   language module translates Python's <symbol>None</symbol> into the
-   SQL null value.
+   <symbol>None</symbol>. The language module translates Python's
+   <symbol>None</symbol> into the SQL null
+   value.<indexterm><primary>null value</><secondary
+   sortas="PL/Python">in PL/Python</></indexterm>
   </para>
 
   <para>
@@ -87,7 +88,9 @@ def __plpython_procedure_myfunc_23456():
    The global dictionary <varname>SD</varname> is available to store
    data between function calls.  This variable is private static data.
    The global dictionary <varname>GD</varname> is public data,
-   available to all Python functions within a session.  Use with care.
+   available to all Python functions within a session.  Use with
+   care.<indexterm><primary>global data</><secondary>in
+   PL/Python</></indexterm>
   </para>
 
   <para>
@@ -102,6 +105,11 @@ def __plpython_procedure_myfunc_23456():
  <sect1 id="plpython-trigger">
   <title>Trigger Functions</title>
 
+  <indexterm zone="plpython-trigger">
+   <primary>trigger</primary>
+   <secondary>in PL/Python</secondary>
+  </indexterm>
+
   <para>
    When a function is used in a trigger, the dictionary
    <literal>TD</literal> contains trigger-related values.  The trigger
@@ -146,7 +154,8 @@ def __plpython_procedure_myfunc_23456():
    <literal>plpy.error("msg")</literal>, and
    <literal>plpy.fatal("msg")</literal>.  They are mostly equivalent
    to calling <literal>elog(<replaceable>LEVEL</>, "msg")</literal>
-   from C code.  <function>plpy.error</function> and
+   from C code.<indexterm><primary>elog</><secondary>in
+   PL/Python</></indexterm>  <function>plpy.error</function> and
    <function>plpy.fatal</function> actually raise a Python exception
    which, if uncaught, causes the PL/Python module to call
    <literal>elog(ERROR, msg)</literal> when the function handler
@@ -187,10 +196,11 @@ foo = rv[i]["my_column"]
   </para>
 
   <para>
-   The second function, <function>plpy.prepare</function>, prepares the
-   execution plan for a query.  It is called with a query string and a
-   list of parameter types, if you have parameter references in the
-   query.  For example:
+   <indexterm><primary>preparing a query</><secondary>in PL/Python</></indexterm>
+   The second function, <function>plpy.prepare</function>, prepares
+   the execution plan for a query.  It is called with a query string
+   and a list of parameter types, if you have parameter references in
+   the query.  For example:
 <programlisting>
 plan = plpy.prepare("SELECT last_name FROM my_users WHERE first_name = $1", [ "text" ])
 </programlisting>
@@ -235,7 +245,8 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS '
   </para>
  </sect1>
 
-<!-- NOT CURRENTLY SUPPORTED 
+<![IGNORE[
+ <!-- NOT CURRENTLY SUPPORTED -->
 
  <sect1 id="plpython-trusted">
   <title>Restricted Environment</title>
@@ -259,6 +270,6 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS '
   </para>
  </sect1>
 
--->
+]]>
 
 </chapter>
index d93f7f6517f3f928dc42e7468b43e1cd70213068..ebcf8bdfb8f3fe9dd6f425292ae38b41729841e6 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.24 2003/06/22 16:17:00 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.24.2.1 2003/09/07 04:36:43 momjian Exp $
 -->
 
  <chapter id="pltcl">
@@ -190,6 +190,11 @@ CREATE FUNCTION overpaid(employee) RETURNS boolean AS '
    <sect1 id="pltcl-global">
     <title>Global Data in PL/Tcl</title>
 
+    <indexterm zone="pltcl-global">
+     <primary>global data</primary>
+     <secondary>in PL/Tcl</secondary>
+    </indexterm>
+
     <para>
      Sometimes it
      is useful to have some global data that is held between two
@@ -298,8 +303,10 @@ spi_exec -array C "SELECT * FROM pg_class" {
       <term><function>spi_prepare</function> <replaceable>query</replaceable> <replaceable>typelist</replaceable></term>
       <listitem>
        <para>
-       Prepares and saves a query plan for later execution.  The saved plan
-       will be retained for the life of the current session.
+       Prepares and saves a query plan for later execution.  The
+       saved plan will be retained for the life of the current
+       session.<indexterm><primary>preparing a query</><secondary>in
+       PL/Tcl</></>
        </para>
        <para>
         The query may use parameters, that is, placeholders for
@@ -437,7 +444,7 @@ SELECT 'doesn''t' AS ret
      <varlistentry>
       <indexterm>
        <primary>elog</primary>
-       <secondary>PL/Tcl</secondary>
+       <secondary>in PL/Tcl</secondary>
       </indexterm>
       <term><function>elog</> <replaceable>level</replaceable> <replaceable>msg</replaceable></term>
       <listitem>
@@ -466,7 +473,7 @@ SELECT 'doesn''t' AS ret
     <title>Trigger Procedures in PL/Tcl</title>
 
     <indexterm>
-     <primary>triggers</primary>
+     <primary>trigger</primary>
      <secondary>in PL/Tcl</secondary>
     </indexterm>
 
index cca78b639779795c05764d3b271a611fc1685d0f..2642b3562141e6a0c026366035754580f602d24d 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.53 2003/06/22 16:16:44 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.53.2.1 2003/09/07 04:36:43 momjian Exp $
 -->
 
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
@@ -188,7 +188,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.53 2003/06/22 16:16:44 tg
   &libpgtcl;
   &ecpg;
   &jdbc;
-  &pygresql;
   &infoschema;
 
  </part>
index 1de14ddeb61fffff6a4db0d96375ff56bcb20034..d949a57df56cac7e4bedbdd836182d7ffbfd5822 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.41 2003/08/14 20:09:31 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.41.2.1 2003/09/07 04:36:43 momjian Exp $ -->
 
 <chapter id="protocol">
  <title>Frontend/Backend Protocol</title>
     ParameterStatus will be generated: they are
     <literal>server_version</> (a pseudo-parameter that cannot change after
     startup);
-    <literal>server_encoding</> (also not presently changeable after start);
     <literal>client_encoding</>,
-    <literal>is_superuser</>, and
+    <literal>is_superuser</>,
+    <literal>session_authorization</literal>, and
     <literal>DateStyle</>.
     This set might change in the future, or even become configurable.
     Accordingly, a frontend should simply ignore ParameterStatus for
index d3ec786ac27663b9123c88f41dd103e609afbf6d..6ca1e0230810165e5afe68af22ae4f2d44fca4ec 100644 (file)
@@ -1,8 +1,16 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.22 2003/08/14 23:13:27 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.22.2.1 2003/09/07 04:36:43 momjian Exp $ -->
 
 <chapter id="queries">
  <title>Queries</title>
 
+ <indexterm zone="queries">
+  <primary>query</primary>
+ </indexterm>
+
+ <indexterm zone="queries">
+  <primary>SELECT</primary>
+ </indexterm>
+
  <para>
   The previous chapters explained how to create tables, how to fill
   them with data, and how to manipulate that data.  Now we finally
@@ -73,6 +81,10 @@ SELECT random();
  <sect1 id="queries-table-expressions">
   <title>Table Expressions</title>
 
+  <indexterm zone="queries-table-expressions">
+   <primary>table expression</primary>
+  </indexterm>
+
   <para>
    A <firstterm>table expression</firstterm> computes a table.  The
    table expression contains a <literal>FROM</> clause that is
@@ -112,6 +124,10 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
     overall table expression.
    </para>
 
+   <indexterm>
+    <primary>ONLY</primary>
+   </indexterm>
+
    <para>
     When a table reference names a table that is the supertable of a
     table inheritance hierarchy, the table reference produces rows of
@@ -125,7 +141,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
     <title>Joined Tables</title>
 
     <indexterm zone="queries-join">
-     <primary>joins</primary>
+     <primary>join</primary>
     </indexterm>
 
     <para>
@@ -141,10 +157,14 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
       <term>Cross join</term>
 
       <indexterm>
-       <primary>joins</primary>
+       <primary>join</primary>
        <secondary>cross</secondary>
       </indexterm>
 
+      <indexterm>
+       <primary>cross join</primary>
+      </indexterm>
+
       <listitem>
 <synopsis>
 <replaceable>T1</replaceable> CROSS JOIN <replaceable>T2</replaceable>
@@ -175,10 +195,14 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
       <term>Qualified joins</term>
 
       <indexterm>
-       <primary>joins</primary>
+       <primary>join</primary>
        <secondary>outer</secondary>
       </indexterm>
 
+      <indexterm>
+       <primary>outer join</primary>
+      </indexterm>
+
       <listitem>
 <synopsis>
 <replaceable>T1</replaceable> { <optional>INNER</optional> | { LEFT | RIGHT | FULL } <optional>OUTER</optional> } JOIN <replaceable>T2</replaceable> ON <replaceable>boolean_expression</replaceable>
@@ -227,9 +251,12 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
 
        <para>
         <indexterm>
-        <primary>joins</primary>
+        <primary>join</primary>
         <secondary>natural</secondary>
        </indexterm>
+        <indexterm>
+        <primary>natural join</primary>
+       </indexterm>
         Finally, <literal>NATURAL</> is a shorthand form of
         <literal>USING</>: it forms a <literal>USING</> list
         consisting of exactly those column names that appear in both
@@ -256,10 +283,14 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
          <term><literal>LEFT OUTER JOIN</></term>
 
          <indexterm>
-          <primary>joins</primary>
+          <primary>join</primary>
           <secondary>left</secondary>
          </indexterm>
 
+         <indexterm>
+          <primary>left join</primary>
+         </indexterm>
+
          <listitem>
           <para>
            First, an inner join is performed.  Then, for each row in
@@ -274,6 +305,15 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
         <varlistentry>
          <term><literal>RIGHT OUTER JOIN</></term>
 
+         <indexterm>
+          <primary>join</primary>
+          <secondary>right</secondary>
+         </indexterm>
+
+         <indexterm>
+          <primary>right join</primary>
+         </indexterm>
+
          <listitem>
           <para>
            First, an inner join is performed.  Then, for each row in
@@ -424,13 +464,13 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
     <title>Table and Column Aliases</title>
 
     <indexterm zone="queries-table-aliases">
-     <primary>label</primary>
-     <secondary>table</secondary>
+     <primary>alias</primary>
+     <secondary>in the FROM clause</secondary>
     </indexterm>
 
     <indexterm>
-     <primary>alias</primary>
-     <see>label</see>
+     <primary>label</primary>
+     <see>alias</see>
     </indexterm>
 
     <para>
@@ -530,7 +570,7 @@ SELECT a.* FROM (my_table AS a JOIN your_table AS b ON ...) AS c
     <title>Subqueries</title>
 
     <indexterm zone="queries-subqueries">
-     <primary>subqueries</primary>
+     <primary>subquery</primary>
     </indexterm>
 
     <para>
@@ -556,6 +596,11 @@ FROM (SELECT * FROM table1) AS alias_name
 
     <indexterm zone="queries-tablefunctions"><primary>table function</></>
 
+    <indexterm zone="queries-tablefunctions">
+     <primary>function</>
+     <secondary>in the FROM clause</>
+    </indexterm>
+
     <para>
      Table functions are functions that produce a set of rows, made up
      of either base data types (scalar types) or composite data types
@@ -628,7 +673,7 @@ SELECT *
    <title>The WHERE Clause</title>
 
    <indexterm zone="queries-where">
-    <primary>where</primary>
+    <primary>WHERE</primary>
    </indexterm>
 
    <para>
@@ -716,7 +761,11 @@ SELECT ... FROM fdt WHERE EXISTS (SELECT c1 FROM t2 WHERE c2 > fdt.c1)
    <title>The GROUP BY and HAVING Clauses</title>
 
    <indexterm zone="queries-group">
-    <primary>group</primary>
+    <primary>GROUP BY</primary>
+   </indexterm>
+
+   <indexterm zone="queries-group">
+    <primary>grouping</primary>
    </indexterm>
 
    <para>
@@ -827,6 +876,10 @@ SELECT product_id, p.name, (sum(s.units) * p.price) AS sales
     column names is also allowed.
    </para>
 
+   <indexterm>
+    <primary>HAVING</primary>
+   </indexterm>
+
    <para>
     If a table has been grouped using a <literal>GROUP BY</literal>
     clause, but then only certain groups are of interest, the
@@ -884,7 +937,7 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit
   <title>Select Lists</title>
 
   <indexterm>
-   <primary>select</primary>
+   <primary>SELECT</primary>
    <secondary>select list</secondary>
   </indexterm>
 
@@ -901,6 +954,10 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit
   <sect2 id="queries-select-list-items">
    <title>Select-List Items</title>
 
+   <indexterm>
+    <primary>*</primary>
+   </indexterm>
+
    <para>
     The simplest kind of select list is <literal>*</literal> which
     emits all columns that the table expression produces.  Otherwise,
@@ -944,8 +1001,8 @@ SELECT tbl1.a, tbl2.a, tbl1.b FROM ...
    <title>Column Labels</title>
 
    <indexterm zone="queries-column-labels">
-    <primary>label</primary>
-    <secondary>column</secondary>
+    <primary>alias</primary>
+    <secondary>in the select list</secondary>
    </indexterm>
 
    <para>
@@ -981,7 +1038,11 @@ SELECT a AS value, b + c AS sum FROM ...
    <title>DISTINCT</title>
 
    <indexterm zone="queries-distinct">
-    <primary>distinct</primary>
+    <primary>DISTINCT</primary>
+   </indexterm>
+
+   <indexterm zone="queries-distinct">
+    <primary>duplicates</primary>
    </indexterm>
 
    <para>
@@ -997,6 +1058,8 @@ SELECT DISTINCT <replaceable>select_list</replaceable> ...
    </para>
 
    <para>
+    <indexterm><primary>null value</><secondary sortas="DISTINCT">in
+    DISTINCT</></indexterm>
     Obviously, two rows are considered distinct if they differ in at
     least one column value.  Null values are considered equal in this
     comparison.
@@ -1035,13 +1098,25 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab
   <title>Combining Queries</title>
 
   <indexterm zone="queries-union">
-   <primary>union</primary>
+   <primary>UNION</primary>
+  </indexterm>
+  <indexterm zone="queries-union">
+   <primary>INTERSECT</primary>
+  </indexterm>
+  <indexterm zone="queries-union">
+   <primary>EXCEPT</primary>
+  </indexterm>
+  <indexterm zone="queries-union">
+   <primary>set union</primary>
+  </indexterm>
+  <indexterm zone="queries-union">
+   <primary>set intersection</primary>
   </indexterm>
   <indexterm zone="queries-union">
-   <primary>intersection</primary>
+   <primary>set difference</primary>
   </indexterm>
   <indexterm zone="queries-union">
-   <primary>except</primary>
+   <primary>set operation</primary>
   </indexterm>
 
   <para>
@@ -1104,7 +1179,10 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab
 
   <indexterm zone="queries-order">
    <primary>sorting</primary>
-   <secondary>query results</secondary>
+  </indexterm>
+
+  <indexterm zone="queries-order">
+   <primary>ORDER BY</primary>
   </indexterm>
           
   <para>
@@ -1173,12 +1251,11 @@ SELECT a AS b FROM table1 ORDER BY a;
   <title>LIMIT and OFFSET</title>
 
   <indexterm zone="queries-limit">
-   <primary>limit</primary>
+   <primary>LIMIT</primary>
   </indexterm>
 
   <indexterm zone="queries-limit">
-   <primary>offset</primary>
-   <secondary>with query results</secondary>
+   <primary>OFFSET</primary>
   </indexterm>
 
   <para>
index 5a7a7f4e62e888a72bb3f8193042ace9d0715240..de464785a4f0b9e3737518e47c3d5fb94c0cb66e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.32 2003/06/24 23:27:24 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.32.2.1 2003/09/07 04:36:43 momjian Exp $
 -->
 
  <chapter id="tutorial-sql">
@@ -87,7 +87,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.32 2003/06/24 23:27:24 momji
    </para>
 
    <para>
-    <indexterm><primary>cluster</primary></indexterm>
+    <indexterm><primary>database cluster</primary></indexterm>
+    <indexterm><primary>cluster</primary><secondary>of databases</secondary><see>database cluster</see></indexterm>
 
     Tables are grouped into databases, and a collection of databases
     managed by a single <productname>PostgreSQL</productname> server
@@ -562,7 +563,7 @@ SELECT *
    <title>Aggregate Functions</title>
 
    <indexterm zone="tutorial-agg">
-    <primary>aggregate</primary>
+    <primary>aggregate function</primary>
    </indexterm>
 
    <para>
index 5d1d4472d01573605dbfd1b9be243d08f3bb5c41..87b27265f16c0e914f2cf573283d40efe2ae46b7 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/abort.sgml,v 1.13 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/abort.sgml,v 1.13.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>abort the current transaction</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-abort">
+  <primary>ABORT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ABORT [ WORK | TRANSACTION ]
index 972accd7565e24daddaf87fa417b12e4ec1b0e23..f1c85849b3ff2fad7d8f9cf1a9d3206959b24c69 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v 1.1 2003/06/27 14:45:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v 1.1.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of an aggregate function</refpurpose>
  </refnamediv>  
   
+ <indexterm zone="sql-alteraggregate">
+  <primary>ALTER AGGREGATE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable> ) RENAME TO <replaceable>newname</replaceable>
index b2767405ca8abcd16f0dd6639e2cbdd51b3f54d3..469b7e5ec5f9b9ec55d8aa5f511435b9e3c3b0fa 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_conversion.sgml,v 1.1 2003/06/27 14:45:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_conversion.sgml,v 1.1.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of a conversion</refpurpose>
  </refnamediv>  
   
+ <indexterm zone="sql-alterconversion">
+  <primary>ALTER CONVERSION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER CONVERSION <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
index 12447d6b0a754740ca5b8769f464da1608165564..bb895328c93e07236b4363d8230aa2980fea2e0f 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.7 2003/06/27 14:45:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.7.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change a database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-alterdatabase">
+  <primary>ALTER DATABASE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>variable</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
index fdbf08e6d484aa3ee05086572a4cbb802803cce2..3980a6f42983913b58b9bf7d11a3b9a7db64c3de 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.7 2003/01/06 00:31:44 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.7.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -8,6 +8,7 @@ PostgreSQL documentation
   <refentrytitle id="sql-alterdomain-title">ALTER DOMAIN</refentrytitle>
   <refmiscinfo>SQL - Language Statements</refmiscinfo>
  </refmeta>
+
  <refnamediv>
   <refname>
    ALTER DOMAIN
@@ -16,6 +17,11 @@ PostgreSQL documentation
    change the definition of a domain
   </refpurpose>
  </refnamediv>
+
+ <indexterm zone="sql-alterdomain">
+  <primary>ALTER DOMAIN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <refsynopsisdivinfo>
    <date>2002-11-27</date>
index 621350980b8471a98c1979c457e9d18765bba280..c54974788d8b373fdc0bba4adbe1e1b86200b182 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.1 2003/06/27 14:45:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.1.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of a function</refpurpose>
  </refnamediv>  
   
+ <indexterm zone="sql-alterfunction">
+  <primary>ALTER FUNCTION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) RENAME TO <replaceable>newname</replaceable>
index 6d0695b93846309bdeb12001143594d797232ce5..588eeec22322ffeaeccf81533bcaa58cbd4f81a3 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_group.sgml,v 1.10 2003/06/27 14:45:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_group.sgml,v 1.10.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change a user group</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-altergroup">
+  <primary>ALTER GROUP</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER GROUP <replaceable class="PARAMETER">groupname</replaceable> ADD USER <replaceable class="PARAMETER">username</replaceable> [, ... ]
index 2c922d58830b0ff8ae24f14f51b072d0e9d60a65..51545e308f47935adf846071bfcf38ff06a3e536 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_language.sgml,v 1.1 2003/06/27 14:45:25 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_language.sgml,v 1.1.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of a procedural language</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-alterlanguage">
+  <primary>ALTER LANGUAGE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER LANGUAGE <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
index 5a9694c73a8053e914fb6acebbcb02ff4450ccfc..186b42bcc93fef685edb804e92019884987a0dde 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_opclass.sgml,v 1.1 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_opclass.sgml,v 1.1.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of an operator class</refpurpose>
  </refnamediv>  
   
+ <indexterm zone="sql-alteropclass">
+  <primary>ALTER OPERATOR CLASS</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> RENAME TO <replaceable>newname</replaceable>
index 6e3c78c9c7cab986b03f0b6e574984a2b6652f7a..6247993e13c9b0999e84ca0d3cc79e399d5c408e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.1 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.1.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of a schema</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-alterschema">
+  <primary>ALTER SCHEMA</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
index 28a81022aabde3164cbb861c4d7e3b3adb6642a2..b7ad7ea245a06914deb84211ec4ff08fae49bc3c 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.2 2003/06/12 07:49:43 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.2.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -8,6 +8,7 @@ PostgreSQL documentation
   <refentrytitle id="SQL-ALTERSEQUENCE-TITLE">ALTER SEQUENCE</refentrytitle>
   <refmiscinfo>SQL - Language Statements</refmiscinfo>
  </refmeta>
+
  <refnamediv>
   <refname>
    ALTER SEQUENCE
@@ -16,6 +17,11 @@ PostgreSQL documentation
    alter the definition of a sequence generator
   </refpurpose>
  </refnamediv> 
+
+ <indexterm zone="sql-altersequence">
+  <primary>ALTER SEQUENCE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <refsynopsisdivinfo>
    <date>1999-07-20</date>
index 7f5456c277264475ef8f7857e9b03859c90862f6..7a208787734762764431a24e19bb12e5dfe63e40 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.59 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.59.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-altertable">
+  <primary>ALTER TABLE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
index b335434eaf8f696e35661374e1df7c4bfe41eec0..90ebe0ce0633397f3023f8c4f12a153f81686790 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.4 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.4.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change the definition of a trigger</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-altertrigger">
+  <primary>ALTER TRIGGER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER TRIGGER <replaceable class="PARAMETER">trigger</replaceable> ON <replaceable class="PARAMETER">table</replaceable>
index 95de7a592d596434feef6b21177aaacd3495225c..a46a6aa029e8ea135b29d18cea8fb15affc24a5f 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.28 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.28.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change a database user account</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-alteruser">
+  <primary>ALTER USER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ALTER USER <replaceable class="PARAMETER">username</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
index 4977964f4e7d6cedb2e97d468438ba13609910dc..12fd1e63be2fedb69455bdf5fd28a97b76330856 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/analyze.sgml,v 1.12 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/analyze.sgml,v 1.12.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>collect statistics about a database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-analyze">
+  <primary>ANALYZE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ (<replaceable class="PARAMETER">column</replaceable> [, ...] ) ] ]
index 7bd1309d289caf26cfafcce806441a0d2ce50c81..30c78be8bcdaa75a5bc4c37587b6a782408ea75e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.24 2003/05/14 03:26:00 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.24.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>start a transaction block</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-begin">
+  <primary>BEGIN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 BEGIN [ WORK | TRANSACTION ]
index 71d075d542e157cef3c750fbad8247618b385129..2ceacfad1a05fcae76ef455eab683eb5091f8bef 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/checkpoint.sgml,v 1.9 2003/04/15 13:25:08 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/checkpoint.sgml,v 1.9.2.1 2003/09/07 04:36:44 momjian Exp $ -->
 
 <refentry id="sql-checkpoint">
  <refmeta>
   <refpurpose>force a transaction log checkpoint</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-checkpoint">
+  <primary>CHECKPOINT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CHECKPOINT
index 9ae487c3f780e67ea6073ae0eb961163d64bf196..5b8df9cfe07657a0062302e5ee65f4b4a3c8f6bb 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.14 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/close.sgml,v 1.14.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>close a cursor</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-close">
+  <primary>CLOSE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CLOSE <replaceable class="PARAMETER">cursor</replaceable>
@@ -31,9 +35,13 @@ CLOSE <replaceable class="PARAMETER">cursor</replaceable>
   </para>
 
   <para>
-   Every open cursor is implicitly closed when a transaction is
-   terminated by <command>COMMIT</command> or
-   <command>ROLLBACK</command>.
+   Every non-holdable open cursor is implicitly closed when a
+   transaction is terminated by <command>COMMIT</command> or
+   <command>ROLLBACK</command>. Holdable cursors are implicitely
+   closed if the transaction that created them aborts via
+   <command>ROLLBACK</command>; if this does not happen, the holdable
+   cursor remains open until an explicit <command>CLOSE</command> is
+   executed, or the client disconnects.
   </para>
  </refsect1>
   
@@ -66,10 +74,10 @@ CLOSE <replaceable class="PARAMETER">cursor</replaceable>
    </varlistentry>
 
    <varlistentry>
-    <term><computeroutput>WARNING:  PerformPortalClose: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found</computeroutput></term>
+    <term><computeroutput>ERROR:  cursor "<replaceable class="PARAMETER">cursor</replaceable>" does not exist</computeroutput></term>
     <listitem>
      <para>
-      This warning is given if <replaceable
+      Message returned if <replaceable
       class="PARAMETER">cursor</replaceable> is not declared or has
       already been closed.
      </para>
index 90c56551a336a1e4806c4c0288ab4abfc3e8fa54..c57f361cfdb8583847a00368c79dc92a57391812 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.26 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.26.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>cluster a table according to an index</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-cluster">
+  <primary>CLUSTER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CLUSTER <replaceable class="PARAMETER">indexname</replaceable> ON <replaceable class="PARAMETER">tablename</replaceable>
index eb8142618764a9d40cb4d319f478116abf5c6d73..69aed65428cf3d3efb561ec261a918c556ff4d91 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.10 2003/06/18 12:19:11 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.10.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>cluster a <productname>PostgreSQL</productname> database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-clusterdb">
+  <primary>clusterdb</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>clusterdb</command>
@@ -129,10 +133,9 @@ PostgreSQL documentation
       <term><option>--host <replaceable class="parameter">host</replaceable></></term>
       <listitem>
        <para>
-       Specifies the host name of the machine on which the 
-       server
-       is running.  If the value begins with a slash, it is used 
-       as the directory for the Unix domain socket.
+       Specifies the host name of the machine on which the server is
+       running.  If the value begins with a slash, it is used as the
+       directory for the Unix domain socket.
        </para>
       </listitem>
      </varlistentry>
@@ -182,7 +185,7 @@ PostgreSQL documentation
       <term><computeroutput>CLUSTER</computeroutput></term>
       <listitem>
        <para>
-        Everything went well.
+        The database was successfully clustered.
        </para>
       </listitem>
      </varlistentry>
index 2eaf4ada45ded6ea33c0aefe832acfb8abd7df15..7e37ed299577e54afade6fa9f70ad9824cfe59c5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.21 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.21.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define or change the comment of an object</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-comment">
+  <primary>COMMENT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 COMMENT ON
index a84c61a90114a6167acd9718473efc4d638aaae5..724f6102e0eed89db66a3f330cc7b7917e18e9ec 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/commit.sgml,v 1.15 2003/04/15 13:25:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/commit.sgml,v 1.15.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>commit the current transaction</refpurpose>
  </refnamediv>  
   
+ <indexterm zone="sql-commit">
+  <primary>COMMIT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 COMMIT [ WORK | TRANSACTION ]
index 0e24f8b3eec203206372fbdfaaddd5ca0de3fbea..ddd819eecb5ce0b6cea669da6539a494c84b321a 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.46 2003/05/09 21:19:48 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.46.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>copy data between files and tables</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-copy">
+  <primary>COPY</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
@@ -380,7 +384,7 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
     The file format used for <command>COPY BINARY</command> changed in
     <application>PostgreSQL</application> 7.4. The new format consists
     of a file header, zero or more tuples containing the row data, and
-    a file trailer.
+    a file trailer. Headers and data are now in network byte order.
    </para>
 
    <refsect3>
@@ -483,6 +487,15 @@ future extension may add a header field that allows per-column format codes
 to be specified.
     </para>
 
+    <para>
+To determine the appropriate binary format for the actual tuple data you
+should consult the <application>PostgreSQL</application> source, in
+particular the <function>*send</> and <function>*recv</> functions for
+the data type (typically found in the <filename>src/backend/utils/adt</filename>
+directory). The <application>contrib/binarycopy</application> module
+can also be used to create an appropriate format file.
+    </para>
+
     <para>
 If OIDs are included in the file, the OID field immediately follows the
 field-count word.  It is a normal field except that it's not included
index 2aff06367134af6033086779f5dc3032dd21107e..81578b30b9705b9c67503c7410a4ebe40841209d 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.26 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.26.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new aggregate function</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createaggregate">
+  <primary>CREATE AGGREGATE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE AGGREGATE <replaceable class="PARAMETER">name</replaceable> (
index b97135c953820422b7d340a08573e23f0bb41e4c..02002e3bddec6dcd94e8502f07fad0ace778bd66 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.11 2003/04/22 10:08:08 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.11.2.1 2003/09/07 04:36:44 momjian Exp $ -->
 
 <refentry id="SQL-CREATECAST">
  <refmeta>
   <refpurpose>define a user-defined cast</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createcast">
+  <primary>CREATE CAST</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>)
index b61cd5d911f9f3ef4d879240e62a07207b06b255..eaa93ba78ee957961cb1646423524a67592ab12d 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_constraint.sgml,v 1.9 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_constraint.sgml,v 1.9.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new constraint trigger</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createconstraint">
+  <primary>CREATE CONSTRAINT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE CONSTRAINT TRIGGER <replaceable class="parameter">name</replaceable>
index 382c50898329e8951e10195e819ed67497c3f4f0..1ced8820b8791119d5b3f56bc5e76ebfb7494725 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v 1.10 2003/06/27 14:45:26 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v 1.10.2.1 2003/09/07 04:36:44 momjian Exp $ -->
 
 <refentry id="SQL-CREATECONVERSION">
  <refmeta>
   <refpurpose>define a user-defined conversion</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createconversion">
+  <primary>CREATE CONVERSION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [DEFAULT] CONVERSION <replaceable>name</replaceable>
index ad0008de403ad8c302f5c2cb93f3834976816f35..398b70386ee573d0851666ad69b0273f8e32c7e6 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.34 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.34.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>create a new database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createdatabase">
+  <primary>CREATE DATABASE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
index 0d6fe6ef50a5b565cece8010808c0f5ff7dc0145..3ff05d603a59b81426add1f2fae7067a30555dcc 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.13 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.13.2.1 2003/09/07 04:36:44 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new domain</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createdomain">
+  <primary>CREATE DOMAIN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE DOMAIN <replaceable class="parameter">domainname</replaceable> [AS] <replaceable class="parameter">data_type</replaceable>
index 4e1978c6eec24d59d201449fa3c477ec7afc7b5f..a6467d774d6b84337d9e0141a9e73aec75137948 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.48 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.48.2.1 2003/09/07 04:36:45 momjian Exp $
 -->
 
 <refentry id="SQL-CREATEFUNCTION">
@@ -13,6 +13,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.48 2003/06/27
   <refpurpose>define a new function</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createfunction">
+  <primary>CREATE FUNCTION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">argtype</replaceable> [, ...] ] )
index d90dd31086a33f8fcaed9d815052fa299fa1bffe..7758de6d47e9caf8aafda388ad04bdeaba9be6c8 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_group.sgml,v 1.11 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_group.sgml,v 1.11.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new user group</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-creategroup">
+  <primary>CREATE GROUP</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE GROUP <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
index ff60aaa3b0102f61d71044864348fc5dbd012175..05293b25d5f424db12a68d4c4088957839550b6c 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.39 2003/05/28 16:03:55 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.39.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new index</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createindex">
+  <primary>CREATE INDEX</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable> ON <replaceable class="parameter">table</replaceable> [ USING <replaceable class="parameter">method</replaceable> ]
index d26eb48911d05bce65eb70521b520818a0c85f9f..a6884abee1d46d310c483683b280806bcfeea091 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.33 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.33.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new procedural language</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createlanguage">
+  <primary>CREATE LANGUAGE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">langname</replaceable>
index eddb8e712879bafb40e4a94f114236a430ee3083..6696a9eb343cdcd2545de681db4082d0f76351dd 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.8 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.8.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new operator class for indexes</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createopclass">
+  <primary>CREATE OPERATOR CLASS</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAULT ] FOR TYPE <replaceable class="parameter">data_type</replaceable> USING <replaceable class="parameter">index_method</replaceable> AS
index 2ac9d3f2edd761f3cf7bfd261d0355463330cf61..d64bc28f2d9c36f3e30ccb31168599e84b06ca0b 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.35 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.35.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new operator</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createoperator">
+  <primary>CREATE OPERATOR</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE OPERATOR <replaceable>name</replaceable> (
@@ -43,17 +47,11 @@ CREATE OPERATOR <replaceable>name</replaceable> (
    The operator name is a sequence of up to <symbol>NAMEDATALEN</>-1
    (63 by default) characters from the following list:
 <literallayout>
-+ - * / &lt; &gt; = ~ ! @ # % ^ &amp; | ` ? $
++ - * / &lt; &gt; = ~ ! @ # % ^ &amp; | ` ?
 </literallayout>
 
    There are a few restrictions on your choice of name:
    <itemizedlist>
-    <listitem>
-     <para>
-     <literal>$</literal> cannot be defined as a single-character operator,
-     although it can be part of a multicharacter operator name.
-     </para>
-    </listitem>
     <listitem>
      <para>
      <literal>--</literal> and <literal>/*</literal> cannot appear anywhere in an operator name,
@@ -66,7 +64,7 @@ CREATE OPERATOR <replaceable>name</replaceable> (
      <literal>-</literal>,
      unless the name also contains at least one of these characters:
 <literallayout>
-~ ! @ # % ^ &amp; | ` ? $
+~ ! @ # % ^ &amp; | ` ?
 </literallayout>
      For example, <literal>@-</literal> is an allowed operator name,
      but <literal>*-</literal> is not.
index ff7f2bfb134cac7c703e3b961f1ee1e2f71a7ea1..566f8bddfb858bcd27dac92de193e4369a075b57 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.39 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.39.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new rewrite rule</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createrule">
+  <primary>CREATE RULE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS ON <replaceable class="parameter">event</replaceable>
index e70d29a37b8301b370ff511428214efefea6b69a..4a40160caf3b8654df0556b7b6e226e468b130d3 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.6 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.6.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new schema</refpurpose>
  </refnamediv> 
 
+ <indexterm zone="sql-createschema">
+  <primary>CREATE SCHEMA</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE SCHEMA <replaceable class="parameter">schemaname</replaceable> [ AUTHORIZATION <replaceable class="parameter">username</replaceable> ] [ <replaceable class="parameter">schema_element</replaceable> [ ... ] ]
index 374f34cb0a8e39b1118c99aa8ec1f60025b13930..93b6fc7d50c52f95ac4d25e8f66d8e8a094ed10f 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.33 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.33.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new sequence generator</refpurpose>
  </refnamediv> 
 
+ <indexterm zone="sql-createsequence">
+  <primary>CREATE SEQUENCE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT [ BY ] <replaceable class="parameter">increment</replaceable> ]
index 2d55997e708daec68e02dfe09d4fa2f1ef32da1f..ea35353d314980da9d7ab6ffd65592056d8f12ed 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.70 2003/06/12 18:34:06 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.70.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createtable">
+  <primary>CREATE TABLE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable class="PARAMETER">table_name</replaceable> (
index 0f648d56b3a93ca864d9111fb8993bf2f9ca077a..4e9a54a9e42c425dfa87a69fc36783a3936c3766 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.14 2003/07/01 00:04:31 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.14.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>create a new table from the results of a query</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createtableas">
+  <primary>CREATE TABLE AS</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name</replaceable> [ (<replaceable>column_name</replaceable> [, ...] ) ]
index 1856264954c0e112cea008f9347b1a01bc695f1a..9ceea50c50308b8cdac935de3be5390996f5eb2c 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.34 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.34.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new trigger</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createtrigger">
+  <primary>CREATE TRIGGER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER } { <replaceable class="PARAMETER">event</replaceable> [ OR ... ] }
index 2d2b92a85aabb07a3105dbabdb3093cb43f23aa0..f72d5344ccff93168c89b538a73e495634988b28 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.43 2003/05/09 23:01:44 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.43.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new data type</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createtype">
+  <primary>CREATE TYPE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE TYPE <replaceable class="parameter">typename</replaceable> AS
index 23d64bd2c547d078cc79be294d2cab5dbfe2e748..382f1a246ce10ec5d32fd5f2c78c2b66e60dd93b 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_user.sgml,v 1.26 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_user.sgml,v 1.26.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new database user account</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createuser">
+  <primary>CREATE USER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE USER <replaceable class="PARAMETER">username</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
index 8bfb4f16636c4c6bfc26db8e9829f704631d08e6..42a69f5fcc251a63da4afbe3cb1d6d08310394a9 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.22 2003/04/22 10:08:08 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.22.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a new view</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-createview">
+  <primary>CREATE VIEW</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 CREATE [ OR REPLACE ] VIEW <replaceable class="PARAMETER">name</replaceable> [ ( <replaceable
index 0ad159842a3a12c380e4a1eee289fd3d2a632c05..4f432a8dd91c7a9bf9c8810ea885581ff1a467ac 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.33 2003/05/26 17:50:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.33.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>create a new <productname>PostgreSQL</productname> database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-createdb">
+  <primary>createdb</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>createdb</command>
index be86e7c1c790fa8d688c29351409da4978a0c5b7..e2fcee63e086bb9463810fc1f19301c61e3245ed 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.31 2003/03/24 14:32:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.31.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>define a new <productname>PostgreSQL</productname> procedural language</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-createlang">
+  <primary>createlang</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>createlang</command>
index ba882776878393151f35027d02818636bd1b2760..0b07662819b309030c686afe2fc94c00e3492efa 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.34 2003/06/06 15:31:46 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.34.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>define a new <productname>PostgreSQL</productname> user account</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-createuser">
+  <primary>createuser</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>createuser</command>
@@ -276,7 +280,7 @@ PostgreSQL documentation
       <term><computeroutput>CREATE USER</computeroutput></term>
       <listitem>
        <para>
-        All is well.
+        The user was successfully created.
        </para>
       </listitem>
      </varlistentry>
index 008a6262e122e904b8d026de66ee3de387c3d028..91355ce61a695eba62d251127bc46be5c7ea5307 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/deallocate.sgml,v 1.2 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/deallocate.sgml,v 1.2.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>deallocate a prepared statement</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-deallocate">
+  <primary>DEALLOCATE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DEALLOCATE [ PREPARE ] <replaceable class="parameter">plan_name</replaceable>
index 0aaf0dde43d0038f43fb5df75e011c872ca7e597..3585a71f79f1b9ce9f8d903e7f89c6e6c412ba41 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.24 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.24.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define a cursor</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-declare">
+  <primary>DECLARE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ]
@@ -202,11 +206,10 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
    </varlistentry>
 
    <varlistentry>
-    <term><computeroutput>WARNING:  Closing pre-existing portal "<replaceable class="parameter">cursorname</replaceable>"</computeroutput></term>
+    <term><computeroutput>ERROR:  cursor "<replaceable class="parameter">cursorname</replaceable>" already exists</computeroutput></term>
     <listitem>
      <para>
-      This message is reported if a cursor with the same name already
-      exists. The previous definition is discarded.
+      This error occurs if a cursor with the same name already exists.
      </para>
     </listitem>
    </varlistentry>
index b04b86c8887b6a0b1102206729560c5b294a9a99..c5c754598605be0136b4f06a75bea77cda0dd172 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/delete.sgml,v 1.17 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/delete.sgml,v 1.17.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>delete rows of a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-delete">
+  <primary>DELETE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
index 49915626a5c3f57fcfed390b1e978b9b51bd6f88..4dcb29eee6111a0a478b1cb2028e0a1da8c2a97e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.23 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.23.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user-defined aggregate function</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropaggregate">
+  <primary>DROP AGGREGATE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> ) [ CASCADE | RESTRICT ]
index 427796e56bf381c0340e0f69fadd32a888c9dece..c25e2ab1db5c24cf37ca6d6730f3c56969ecc788 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.3 2003/05/04 02:23:16 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.3.2.1 2003/09/07 04:36:45 momjian Exp $ -->
 
 <refentry id="SQL-DROPCAST">
  <refmeta>
   <refpurpose>remove a user-defined cast</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropcast">
+  <primary>DROP CAST</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) [ CASCADE | RESTRICT ]
index d9c795c445a3408c53458a02befbdde80437c356..b225e2b1ceaddd319506d9f9b5cc7f8afb799f47 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_conversion.sgml,v 1.5 2003/06/27 14:45:26 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_conversion.sgml,v 1.5.2.1 2003/09/07 04:36:45 momjian Exp $ -->
 
 <refentry id="SQL-DROPCONVERSION">
  <refmeta>
   <refpurpose>remove a user-defined conversion</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropconversion">
+  <primary>DROP CONVERSION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP CONVERSION <replaceable>conversion_name</replaceable> [ CASCADE | RESTRICT ]
index fb77f53c67ce4d7bc05247ff835a0cacad9ff476..4c71b3cf680622216e882829a2c22f869f3027fb 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v 1.16 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v 1.16.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropdatabase">
+  <primary>DROP DATABASE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP DATABASE <replaceable class="PARAMETER">name</replaceable>
index 99c8ec7d44e89ec1c180a757b12451d47541055e..81271c88bf1cd3714f37ffe4e47f31cb9ba47ebe 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.10 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.10.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a domain</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropdomain">
+  <primary>DROP DOMAIN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP DOMAIN <replaceable class="PARAMETER">domainname</replaceable> [, ...]  [ CASCADE | RESTRICT ]
index 1a62a00f482129ebd736140e2a74725121310077..005c8a1567b7b6d9edb5fb6d0fa9b464eeeb6964 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.25 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.25.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user-defined function</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropfunction">
+  <primary>DROP FUNCTION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) [ CASCADE | RESTRICT ]
index c6c6907e7518810a6060b55b26d0d2eb605aa64e..bf83d1e0221be011de0e40154f6377541669e3d0 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_group.sgml,v 1.5 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_group.sgml,v 1.5.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user group</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropgroup">
+  <primary>DROP GROUP</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP GROUP <replaceable class="PARAMETER">name</replaceable>
index 4185a4158c2e6c73def56de13bae42cc01079132..5b33121c468b420ed63cc0855e3b9dfd212097f2 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.18 2003/06/24 23:29:25 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.18.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove an index</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropindex">
+  <primary>DROP INDEX</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP INDEX <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
index ad67a95d4422ecd6cc3c853e2dff7c36c8bdbd53..f1f50a1772ed03377c6b066e399cd3405eb9dcb2 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.17 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.17.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user-defined procedural language</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-droplanguage">
+  <primary>DROP LANGUAGE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ]
index cb0aebd710308c47713b567ff8d3583ccd286f2f..0c5413c8e63d8cbf2ac44552cc7a8eca168cf904 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.4 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.4.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user-defined operator class</refpurpose>
  </refnamediv>
   
+ <indexterm zone="sql-dropopclass">
+  <primary>DROP OPERATOR CLASS</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ]
index 8f3b1e069c6138fd9c7f315f574b19fe615568d6..feae97f5f0d5527ed8487ce87465863a4ad399fc 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.19 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.19.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user-defined operator</refpurpose>
  </refnamediv>
   
+ <indexterm zone="sql-dropoperator">
+  <primary>DROP OPERATOR</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE ) [ CASCADE | RESTRICT ]
index 0276621c57507a4167828542299dd579f79c3846..6824cd268b8fa253dce6623bfb8bef2e5e80d138 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.17.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a rewrite rule</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-droprule">
+  <primary>DROP RULE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">relation</replaceable> [ CASCADE | RESTRICT ]
index b8f706b0c777a902e218b80832a92bd04ad44e65..61c8fbc94210ef84a2071fb91f2fe65d61c58e3e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_schema.sgml,v 1.3 2003/06/27 14:45:26 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_schema.sgml,v 1.3.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a schema</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropschema">
+  <primary>DROP SCHEMA</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP SCHEMA <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
index fe77e2a3d69b4b9758ed4f63a0224ef08f81d579..8aeeb80fd70e1864b558fc1151480ffde16f5acf 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.17.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a sequence</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropsequence">
+  <primary>DROP SEQUENCE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP SEQUENCE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
index 4ebda8787e637c0face0cd3117301e1759c6ab48..7671f9dbf03686254fbdbc9ff17e49b61c50150d 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.18 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.18.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-droptable">
+  <primary>DROP TABLE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP TABLE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
index 5a33d033c24c1d68be4c5fa3134f09e07bab63e8..92307dc74592d0f157dd47eb16107696dfea2694 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.15 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.15.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a trigger</refpurpose> 
  </refnamediv>            
 
+ <indexterm zone="sql-droptrigger">
+  <primary>DROP TRIGGER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ]
index 4267efcb0bd7f7ee7bdc14199ef390a1fc18ec79..ccbdea350de92ae075a1cb867ecee7e5853d6373 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.21 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.21.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a user-defined data type</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-droptype">
+  <primary>DROP TYPE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP TYPE <replaceable class="PARAMETER">typename</replaceable> [, ...] [ CASCADE | RESTRICT ]
index 7d094b993d332b64449ed9c2b6922f3957967964..41040fe7a35ec18d001ca2dd11b0b12f010ed369 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.16 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.16.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a database user account</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropuser">
+  <primary>DROP USER</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP USER <replaceable class="PARAMETER">name</replaceable>
index fd32f92f8ac535d72e3e5f324293853a952f1364..4238a61cc8326667459b963c46f22076fbc857a5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.17.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove a view</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-dropview">
+  <primary>DROP VIEW</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 DROP VIEW <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
index e029b1a6a3601d60899d570280d383e7b6fe1b41..b21ad29a91b292a1879e53d8c86884098ce2f794 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.22 2003/05/26 17:50:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.22.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>remove a <productname>PostgreSQL</productname> database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-dropdb">
+  <primary>dropdb</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>dropdb</command>
index 6bddf1a5ba506475aff0081511fba3250505aa75..6d4f181feeb1ac438cea252fb2c0315ce99325a8 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.23 2003/03/24 14:32:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.23.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>remove a <productname>PostgreSQL</productname> procedural language</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-droplang">
+  <primary>droplang</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>droplang</command>
index 24e8d8ecf45367cb540ed8eafddfdd58c4ba8bf6..d1d8d10289d7651f79178113155ecbefa51643ff 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.26 2003/06/18 12:19:11 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.26.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>remove a <productname>PostgreSQL</productname> user account</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-dropuser">
+  <primary>dropuser</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>dropuser</command>
@@ -180,7 +184,7 @@ PostgreSQL documentation
       <term><computeroutput>DROP USER</computeroutput></term>
       <listitem>
        <para>
-        All is well.
+        The user was successfully removed.
        </para>
       </listitem>
      </varlistentry>
index ffb5ed419450e817983624fe370c2ff8473097d4..4fb4d72c5ad7b5e1ec966fec4453125e45300d9f 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.26 2003/03/25 16:15:39 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.26.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>embedded SQL C preprocessor</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-ecpg">
+  <primary>ecpg</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>ecpg</command>
index b672319479e74526692ee5853c46cc28871d1022..82274be3e5c166e29ae440dbd9883f5312e28023 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/end.sgml,v 1.9 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/end.sgml,v 1.9.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>commit the current transaction</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-end">
+  <primary>END</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 END [ WORK | TRANSACTION ]
index 7704b8ce27b67ade824d66ced73b88eca1c8dfeb..d5e29a07a1e5eef335700dbf4cc73d0d9e16893c 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/execute.sgml,v 1.5 2003/07/01 00:04:31 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/execute.sgml,v 1.5.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>execute a prepared statement</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-execute">
+  <primary>EXECUTE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 EXECUTE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable class="PARAMETER">parameter</replaceable> [, ...] ) ]
index 2ac74e8a383f065f987b61750b0f5831fcb0c04e..5078d8fcc846056956eba6a8c8abfc40b7954d04 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/explain.sgml,v 1.26 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/explain.sgml,v 1.26.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>show the execution plan of a statement</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-explain">
+  <primary>EXPLAIN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 EXPLAIN [ ANALYZE ] [ VERBOSE ] <replaceable class="parameter">statement</replaceable>
index 305e5fc02ccaa66e2f1c8731fe531d9e055268e8..682a4a683786a6d369904cd5b29047df4b7ce80d 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.29 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.29.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>retrieve rows from a query using a cursor</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-fetch">
+  <primary>FETCH</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 FETCH [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursor</replaceable>
@@ -281,7 +285,7 @@ where <replaceable class="PARAMETER">direction</replaceable> can be empty or one
 
   <variablelist>
    <varlistentry>
-    <term><computeroutput>WARNING:  PerformPortalFetch: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found</computeroutput></term>
+    <term><computeroutput>ERROR:  cursor "<replaceable class="PARAMETER">cursor</replaceable>" does not exist</computeroutput></term>
     <listitem>
      <para>
       There is no cursor with the specified name.
index 7ba370d65985e8402cf4eeb0eaeed99b79883a8e..10ec3ca1027f7c1cd6567426abfcade14ba67974 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.33 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.33.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>define access privileges</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-grant">
+  <primary>GRANT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 GRANT { { SELECT | INSERT | UPDATE | DELETE | RULE | REFERENCES | TRIGGER }
index ccab2e9442254f4ac6b610327f60338035c0d5e8..1ab6d7f48d3c53d07d9f2644076598c9d35c2542 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.26 2003/03/25 16:15:41 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.26.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>create a new <productname>PostgreSQL</productname> database cluster</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-initdb">
+  <primary>initdb</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>initdb</command>
index 8211e635cd2a3c922d54f8ef73e41b71ab16cb7c..938994e695398ded370db46497b399b3ef41f6aa 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.20 2003/03/25 16:15:42 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.20.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>create a secondary <productname>PostgreSQL</productname> database storage area</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-initlocation">
+  <primary>initlocation</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>initlocation</command>
index cbb0d279bd271d6d4bceaa3ea21cbeee93110411..12f6d70384e184f5e6559aaa44311c4e4358ba1f 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.23 2003/07/03 16:32:03 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.23.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>create new rows in a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-insert">
+  <primary>INSERT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable class="PARAMETER">column</replaceable> [, ...] ) ]
index 85ca334c178c00baed32fdbf333dacd5d539ead5..48efbd6759081461e4b653f0910ddd7227e96f84 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/ipcclean.sgml,v 1.8 2003/03/24 14:32:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/ipcclean.sgml,v 1.8.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>remove shared memory and semaphores from an aborted <productname>PostgreSQL</productname> server</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-ipcclean">
+  <primary>ipcclean</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>ipcclean</command>
index 154224d0d20f601c8d08bf7daf41f8519dc3af2e..733d34bda5866c502c494839317ee82eeec77b81 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/listen.sgml,v 1.16 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/listen.sgml,v 1.16.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>listen for a notification</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-listen">
+  <primary>LISTEN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 LISTEN <replaceable class="PARAMETER">name</replaceable>
index 056322f58ed7437e1df2a9e11e228b16c0fc0047..ee0bf007d6a5037962eef007e5693a0501b27763 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/load.sgml,v 1.17 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/load.sgml,v 1.17.2.1 2003/09/07 04:36:45 momjian Exp $
 -->
 
 <refentry id="SQL-LOAD">
@@ -13,6 +13,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ref/load.sgml,v 1.17 2003/04/26 23:56:51 pe
   <refpurpose>load or reload a shared library file</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-load">
+  <primary>LOAD</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 LOAD '<replaceable class="PARAMETER">filename</replaceable>'
index c39cb154b8e35888893625bfc940a6561ac9b913..8dfb661ba80707190913e38450b6696c01ed04e2 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.35 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.35.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>lock a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-lock">
+  <primary>LOCK</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 LOCK [ TABLE ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ IN <replaceable class="PARAMETER">lockmode</replaceable> MODE ]
index d60ec29c3b56e1b1ce48de3bf52c81faaec2e4c6..b21f0244a70a295a3202af8fb547f039cc5206f4 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/move.sgml,v 1.22 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/move.sgml,v 1.22.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>reposition a cursor</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-move">
+  <primary>MOVE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 MOVE [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursor</replaceable>
index 82cd15317903662e574934a2cd31dd09fda09afa..37e6f8babc22e073d6f1c11978efa67ef2506fef 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/notify.sgml,v 1.20 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/notify.sgml,v 1.20.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>generate a notification</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-notify">
+  <primary>NOTIFY</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 NOTIFY <replaceable class="PARAMETER">name</replaceable>        
index 084d78b95d048d897f6573bc63972e736965ef0a..cb27d5c902ab433d1e9e79f43978b91ec0a8dd9b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.15 2003/03/25 16:15:42 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.15.2.1 2003/09/07 04:36:45 momjian Exp $ -->
 
 <refentry id="app-pgconfig">
  <refmeta>
   <refpurpose>retrieve information about the installed version of <productname>PostgreSQL</></refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pgconfig">
+  <primary>pg_config</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pg_config</command>
index 314022eb925e099a2af52cfccfe38957c706e41b..42d767846e2066f15daa6d688e6cc515b7111293 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_controldata.sgml,v 1.5 2003/03/24 14:32:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_controldata.sgml,v 1.5.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>display control information of a <productname>PostgreSQL</productname> database cluster</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pgcontroldata">
+  <primary>pg_controldata</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pg_controldata</command>
index 8aabb33934f09696c195bc587e166d66083a4703..812e76e650ec0cc0c58a1675a519efc7e8446a7b 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.22 2003/03/25 16:15:42 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.22.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>start, stop, or restart a <productname>PostgreSQL</productname> server</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pg-ctl">
+  <primary>pg_ctl</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pg_ctl</command>
index 5b9e2d4c40e84bdaa207bf4793037c8f0b0bd433..23ef56858f9281a50d728cf775848db63ac68103 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.62 2003/06/11 16:29:42 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.62.2.1 2003/09/07 04:36:45 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -18,6 +18,10 @@ PostgreSQL documentation
   </refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pgdump">
+  <primary>pg_dump</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pg_dump</command>
index 500336e9196143a34258e245bc87cca6d12c6c29..e0ac946472aaac32a867a1538421d1d8a02d7bcf 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.39 2003/05/30 23:55:10 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.39.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>extract a <productname>PostgreSQL</productname> database cluster into a script file</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pg-dumpall">
+  <primary>pg_dumpall</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pg_dumpall</command>
index cf028b93e59237b2df9a10c48bed3bebeb6f36c0..a04427a7cbd30dd11bc71f33e05f7a6e6e86d855 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.39 2003/06/11 16:29:42 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.39.2.1 2003/09/07 04:36:46 momjian Exp $ -->
 
 <refentry id="APP-PGRESTORE">
  <refmeta>
   </refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pgrestore">
+  <primary>pg_restore</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pg_restore</command>
@@ -42,8 +46,8 @@
   <para>
    <application>pg_restore</application> can operate in two modes: If
    a database name is specified, the archive is restored directly into
-   the database.  Large objects can only be restored by using a direct
-   database connection.  Otherwise, a script containing the SQL
+   the database.  (Large objects can only be restored by using such a direct
+   database connection.)  Otherwise, a script containing the SQL
    commands necessary to rebuild the database is created (and written
    to a file or standard output), similar to the ones created by the
    <application>pg_dump</application> plain text format.  Some of the
       <term><option>--orig-order</option></term>
       <listitem>
        <para>
-        Restore items in the original dump order. By default
-        <application>pg_dump</application> will dump items in an order
-        convenient to <application>pg_dump</application>, then save the
-        archive in a modified OID order. This option overrides the OID
-        ordering.
+        Restore items in the order they were originally generated within
+        <application>pg_dump</application>.  This option has no known
+       practical use, since <application>pg_dump</application> generates
+       the items in an order convenient to it, which is unlikely to be a
+       safe order for restoring them.  (This is <emphasis>not</> the order
+       in which the items are ultimately listed in the archive's table of
+       contents.)  See also <option>-r</>.
        </para>
       </listitem>
      </varlistentry>
       <term><option>--oid-order</option></term>
       <listitem>
        <para>
-        Restore items in the OID order. By default
-        <application>pg_dump</application> will dump items in an order
-        convenient to <application>pg_dump</application>, then save the
-        archive in a modified OID order. This option enforces strict
-        OID ordering.
+        Restore items in order by OID.  This option is of limited usefulness,
+       since OID is only an approximate indication of original creation
+       order.  This option overrides <option>-N</> if both are specified.
+       See also <option>-r</>.
        </para>
       </listitem>
      </varlistentry>
       <term><option>--rearrange</option></term>
       <listitem>
        <para>
-        Restore items in modified OID order. By default
-        <application>pg_dump</application> will dump items in an order
-        convenient to <application>pg_dump</application>, then save the
-        archive in a modified OID order. Most objects will be restored
-        in OID order, but some things (e.g., rules and indexes) will
-        be restored at the end of the process irrespective of their
-        OIDs. This option is the default.
+        Rearrange items by object type (this occurs after the sorting
+       specified by <option>-N</option> or <option>-o</option>, if
+       given).  The rearrangement is intended to give the best possible
+       restore performance.
+       </para>
+
+       <para>
+        When none of <option>-N</option>, <option>-o</option>, and
+       <option>-r</> appear, <application>pg_restore</application> restores
+       items in the order they appear in the dump's table of contents,
+       or in the order they appear in the  <REPLACEABLE
+        CLASS="PARAMETER">list-file</REPLACEABLE> if <option>-L</> is
+       given.  The combination of <option>-o</> and <option>-r</>
+       duplicates the sorting done by <application>pg_dump</application>
+       before creating the dump's table of contents,
+       and so it is normally unnecessary to specify it.
        </para>
       </listitem>
      </varlistentry>
index 2a32d6305e06d50f1ee9f312ac8ea6fffd17bcbf..f7b52a7cc084f12d2f8c69028da7fb12357cb741 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgtclsh.sgml,v 1.8 2003/03/25 16:15:43 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgtclsh.sgml,v 1.8.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -17,6 +17,10 @@ PostgreSQL documentation
   </refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pgtclsh">
+  <primary>pgtclsh</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pgtclsh</command>
index bcc052bfdbf14fb0a42e6488c718ffaea2432928..c04f219c3f8a0676a976727d363c0a6a18d6d6f5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgtksh.sgml,v 1.8 2003/03/25 16:15:43 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgtksh.sgml,v 1.8.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -17,6 +17,10 @@ PostgreSQL documentation
   </refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-pgtksh">
+  <primary>pgtksh</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>pgtksh</command>
index 073b83fd7d979f2f0c9baee75ca913113d337b9e..66e5e02502b3c02eecebb42898fe755e01af9545 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.34 2003/07/29 00:03:17 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.34.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>run a <productname>PostgreSQL</productname> server in single-user mode</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-postgres">
+  <primary>postgres (the program)</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <!-- standalone call -->
index ed431c6b54b0139219b8f5e07f7f970f5bb9fe59..d68827c6e1e0d2c5d1ef9c840c2bd8de17487af1 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.36 2003/03/25 16:15:43 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.36.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose><productname>PostgreSQL</productname> multiuser database server</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-postmaster">
+  <primary>postmaster</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>postmaster</command>
index 9f58b7a5ce8722a4a93d85720d6a0ed396582f49..22f9067dd0d7021e2be38dd22e85100590ae2212 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/prepare.sgml,v 1.4 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/prepare.sgml,v 1.4.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>prepare a statement for execution</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-prepare">
+  <primary>PREPARE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 PREPARE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable class="PARAMETER">datatype</replaceable> [, ...] ) ] AS <replaceable class="PARAMETER">statement</replaceable>
@@ -130,7 +134,7 @@ PREPARE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable c
    In some situations, the query plan produced by for a prepared
    statement may be inferior to the plan produced if the statement
    were submitted and executed normally. This is because when the
-   statement is planned and the planer attempts to determine the
+   statement is planned and the planner attempts to determine the
    optimal query plan, the actual values of any parameters specified
    in the statement are
    unavailable. <productname>PostgreSQL</productname> collects
index 3969a1ad641b74f79253fe524de4f2d8c6784ecd..251f67fa5cdaf9dad7b637c716d5e0404b25119b 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.94 2003/08/02 02:44:38 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.94.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -17,6 +17,10 @@ PostgreSQL documentation
     </refpurpose>
   </refnamediv>
 
+ <indexterm zone="app-psql">
+  <primary>psql</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>psql</command>
@@ -2210,8 +2214,14 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
 
       <varlistentry>
         <term><literal>%n</literal></term>
-       <listitem><para>The user name you are connected as (not your local system
-         user name).</para></listitem>
+       <listitem>
+         <para>
+          The database session user name.  (The expansion of this
+          value might change during a database session as the result
+          of the command <command>SET SESSION
+          AUTHORIZATION</command>.)
+         </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
@@ -2227,8 +2237,15 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
 
       <varlistentry>
         <term><literal>%#</literal></term>
-       <listitem><para>If the current user is a database superuser, then a
-         <literal>#</literal>, otherwise a <literal>&gt;</literal>.</para></listitem>
+       <listitem>
+         <para>
+          If the session user is a database superuser, then a
+          <literal>#</literal>, otherwise a <literal>&gt;</literal>.
+          (The expansion of this value might change during a database
+          session as the result of the command <command>SET SESSION
+          AUTHORIZATION</command>.)
+         </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
index 591542ac1e06f0fafd625c9ca944888474058d5a..c18950d0d29628cec324e98d8725c9c4ff4fb6b4 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.17 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.17.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>rebuild indexes</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-reindex">
+  <primary>REINDEX</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 REINDEX { DATABASE | TABLE | INDEX } <replaceable class="PARAMETER">name</replaceable> [ FORCE ]
index 87d9de309745fec8f6b20e1d0c7ccc02c3b442a4..71a2bf01b68849da741b87c9d73a25104d1a6953 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.20 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.20.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>restore the value of a run-time parameter to the default value</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-reset">
+  <primary>RESET</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 RESET <replaceable class="PARAMETER">parameter</replaceable>
index 22cb395a75d71ebed4385762141d82e5ab9e689a..6f7eb06deb23f4e6a63ef5d309300f692ee13ca9 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/revoke.sgml,v 1.26 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/revoke.sgml,v 1.26.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>remove access privileges</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-revoke">
+  <primary>REVOKE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 REVOKE [ GRANT OPTION FOR ]
index dc5b063c495ddf4b4ce1ab4f22e0827b7349efeb..3a6026fee2af16cd3df9803a169703b490586fe8 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/rollback.sgml,v 1.14 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/rollback.sgml,v 1.14.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>abort the current transaction</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-rollback">
+  <primary>ROLLBACK</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 ROLLBACK [ WORK | TRANSACTION ]
index f983b2a8213f916f1be22edbf2df61afb38d2c8f..2353bb540cdd5acf8eb36a9f9b1c187f3a8b99ca 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.67 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.67.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>retrieve rows from a table or view</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-select">
+  <primary>SELECT</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replaceable> [, ...] ) ] ]
@@ -660,8 +664,11 @@ SELECT name FROM distributors ORDER BY code;
     <literal>ORDER BY</> clause.  If not specified, <literal>ASC</> is
     assumed by default.  Alternatively, a specific ordering operator
     name may be specified in the <literal>USING</> clause.
-    <literal>ASC</> is equivalent to <literal>USING &lt;</> and
-    <literal>DESC</> is equivalent to <literal>USING &gt;</>.
+    <literal>ASC</> is usually equivalent to <literal>USING &lt;</> and
+    <literal>DESC</> is usually equivalent to <literal>USING &gt;</>.
+    (But the creator of a user-defined datatype can define exactly what the
+    default sort ordering is, and it might correspond to operators with other
+    names.)
    </para>
 
    <para>
@@ -671,7 +678,7 @@ SELECT name FROM distributors ORDER BY code;
    </para>
 
    <para>
-    Data of character types is sorted according to the locale-specific
+    Character-string data is sorted according to the locale-specific
     collation order that was established when the database cluster
     was initialized.
    </para>
@@ -1003,7 +1010,9 @@ SELECT distributors.* FROM distributors d, distributors distributors;
     that he will actually get.  To help detect this sort of mistake,
     PostgreSQL will warn if the implicit-<literal>FROM</literal>
     feature is used in a <command>SELECT</command> statement that also
-    contains an explicit <literal>FROM</literal> clause.
+    contains an explicit <literal>FROM</literal> clause.  Also, it is
+    possible to disable the implicit-<literal>FROM</literal> feature
+    by setting the <varname>ADD_MISSING_FROM</> parameter to false.
    </para>
   </refsect2>
 
@@ -1015,7 +1024,7 @@ SELECT distributors.* FROM distributors d, distributors distributors;
     noise and can be omitted without affecting the meaning.  The
     <productname>PostgreSQL</productname> parser requires this key
     word when renaming output columns because the type extensibility
-    features lead to parsing ambiguities in this context.
+    features lead to parsing ambiguities without it.
     <literal>AS</literal> is optional in <literal>FROM</literal>
     items, however.
    </para>
@@ -1025,7 +1034,7 @@ SELECT distributors.* FROM distributors d, distributors distributors;
    <title>Namespace Available to <literal>GROUP BY</literal> and <literal>ORDER BY</literal></title>
 
    <para>
-    In the SQL standard, an <literal>ORDER BY</literal> clause may
+    In the SQL92 standard, an <literal>ORDER BY</literal> clause may
     only use result column names or numbers, while a <literal>GROUP
     BY</literal> clause may only use expressions based on input column
     names.  <productname>PostgreSQL</productname> extends each of
@@ -1036,6 +1045,13 @@ SELECT distributors.* FROM distributors d, distributors distributors;
     expression will always be taken as input-column names, not as
     result-column names.
    </para>
+
+   <para>
+    SQL99 uses a slightly different definition which is not upward compatible
+    with SQL92.  In most cases, however, <productname>PostgreSQL</productname>
+    will interpret an <literal>ORDER BY</literal> or <literal>GROUP
+    BY</literal> expression the same way SQL99 does.
+   </para>
   </refsect2>
 
   <refsect2>
index 131bb6e1a2f7eed7c75f500345e63e294cf00f41..b7263025170331bfdc98351bfa79773fcf96a1fc 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v 1.22 2003/05/04 02:23:16 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v 1.22.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>create a new table from the results of a query</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-selectinto">
+  <primary>SELECT INTO</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replaceable> [, ...] ) ] ]
index bb1ddd227599794e6c5364288e633e58dcb3f441..57c491d6df5e44558ddd7db248679b2deddf203b 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.80 2003/07/29 00:03:17 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.80.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>change a run-time parameter</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-set">
+  <primary>SET</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SET [ SESSION | LOCAL ] <replaceable class="PARAMETER">variable</replaceable> { TO | = } { <replaceable class="PARAMETER">value</replaceable> | '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
index 3d5b58bee2ec336a2e81cededa531397b1a5d847..3e89f60769d43563b9b5cd81f653d7869346d962 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.6 2003/05/04 02:23:16 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.6.2.1 2003/09/07 04:36:46 momjian Exp $ -->
 <refentry id="SQL-SET-CONSTRAINTS">
  <refmeta>
   <refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
   <refpurpose>set the constraint mode of the current transaction</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-set-constraints">
+  <primary>SET CONSTRAINTS</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable> [, ...] } { DEFERRED | IMMEDIATE }
index f8c0297adad5bc4cfd3e3c87f775bdc7ea6260a2..ba2c27acbe99204dc333dbf0c848317140262d3f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.9 2003/05/04 02:23:16 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.9.2.1 2003/09/07 04:36:46 momjian Exp $ -->
 <refentry id="SQL-SET-SESSION-AUTHORIZATION">
  <refmeta>
   <refentrytitle id="sql-set-session-authorization-title">SET SESSION AUTHORIZATION</refentrytitle>
   <refpurpose>set the session user identifier and the current user identifier of the current session</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-set-session-authorization">
+  <primary>SET SESSION AUTHORIZATION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SET [ SESSION | LOCAL ] SESSION AUTHORIZATION <replaceable class="parameter">username</replaceable>
index 2ff29bc3d5f6d41666c7c0cbbb3e6d024bdb532d..d531d8f43afdb37a617e727e637e5e415bb18fbd 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.14 2003/05/04 02:23:16 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.14.2.1 2003/09/07 04:36:46 momjian Exp $ -->
 <refentry id="SQL-SET-TRANSACTION">
  <refmeta>
   <refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
   <refpurpose>set the characteristics of the current transaction</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-set-transaction">
+  <primary>SET TRANSACTION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SET TRANSACTION
index 1f0f52735a0c5aec32e7c4b625720cd32f411429..3bb52cce54b1bd8d100f877821ba3c678f3ceefc 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.30 2003/07/29 00:03:17 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.30.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>show the value of a run-time parameter</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-show">
+  <primary>SHOW</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 SHOW <replaceable class="PARAMETER">name</replaceable>
index 5b9abefddd8c998f8278767daa21f017593efd13..8b8690c0f294380e6916b7079f7875d288e65701 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.5 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.5.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>start a transaction block</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-start-transaction">
+  <primary>START TRANSACTION</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 START TRANSACTION [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
index b5b9d84ddc872dcc3784925df17167242f961627..f10d0a4456c6ebd345a60b07f77cdba31fd9656f 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.10 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.10.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>empty a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-truncate">
+  <primary>TRUNCATE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable>
index 4c3799177b28cd0ef8c0eefae9ff6773d1e386e2..54e857b3c9bc467538c66a9603f6a37bf2555d03 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.21 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.21.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>stop listening for a notification</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-unlisten">
+  <primary>UNLISTEN</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 UNLISTEN { <replaceable class="PARAMETER">name</replaceable> | * }
index 1fe85b995ed999f4322b1d0298a28df7f07723e6..c7020e85a7a53e023d979019400d589d0adf6abe 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/update.sgml,v 1.23 2003/07/03 16:32:12 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/update.sgml,v 1.23.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>update rows of a table</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-update">
+  <primary>UPDATE</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 UPDATE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> SET <replaceable class="PARAMETER">column</replaceable> = { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } [, ...]
index 3f532c024484a6fd6fc71adb31415f4c5f26153f..3cfba61f445a0898ecf42df18c5043639b9cd697 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.31 2003/04/26 23:56:51 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.31.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -14,6 +14,10 @@ PostgreSQL documentation
   <refpurpose>garbage-collect and optionally analyze a database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="sql-vacuum">
+  <primary>VACUUM</primary>
+ </indexterm>
+
  <refsynopsisdiv>
 <synopsis>
 VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> ]
index e04cf16c3fe17ce3960c842280429f42c6f3fec8..5bc236ccd8bc3363d1281717ed45dc228c703f7d 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.29 2003/06/18 12:19:11 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.29.2.1 2003/09/07 04:36:46 momjian Exp $
 PostgreSQL documentation
 -->
 
@@ -15,6 +15,10 @@ PostgreSQL documentation
   <refpurpose>garbage-collect and analyze a <productname>PostgreSQL</productname> database</refpurpose>
  </refnamediv>
 
+ <indexterm zone="app-vacuumdb">
+  <primary>vacuumdb</primary>
+ </indexterm>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>vacuumdb</command>
@@ -59,10 +63,11 @@ PostgreSQL documentation
 
 
   <para>
-  <application>vacuumdb</application> might need to connect several
-  times to the <productname>PostgreSQL</productname> server, asking for
-  a password each time. It is convenient to have a
-  <filename>$HOME/.pgpass</> file in such cases.
+   <application>vacuumdb</application> might need to connect several
+   times to the <productname>PostgreSQL</productname> server, asking
+   for a password each time. It is convenient to have a
+   <filename>$HOME/.pgpass</> file in such cases. See <xref
+   linkend="libpq-pgpass"> for more information.
   </para>
 
  </refsect1>
@@ -234,7 +239,7 @@ PostgreSQL documentation
       <term><computeroutput>VACUUM</computeroutput></term>
       <listitem>
        <para>
-        Everything went well.
+        The database was successfully vacuumed.
        </para>
       </listitem>
      </varlistentry>
index a5dac7a14112b7495e43537964ece1bc4f7d7ce6..52ea13fae0e4005c8dbd41b91edba1592d237454 100644 (file)
@@ -1,8 +1,16 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.32 2003/04/06 17:47:24 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.32.2.1 2003/09/07 04:36:43 momjian Exp $ -->
 
  <chapter id="regress">
   <title id="regress-title">Regression Tests</title>
 
+  <indexterm zone="regress">
+   <primary>regression tests</primary>
+  </indexterm>
+
+  <indexterm zone="regress">
+   <primary>test</primary>
+  </indexterm>
+
   <para>
    The regression tests are a comprehensive set of tests for the SQL
    implementation in <productname>PostgreSQL</productname>.  They test
index 1f4538c7c87907010bc583a000402f1cfd64528f..9ff2cb05cceb10ffcdbac702ad1dbf8a4e1ab5c6 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.204 2003/07/31 04:48:15 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.204.2.1 2003/09/07 04:36:43 momjian Exp $
 -->
 
 <appendix id="release">
@@ -456,8 +456,8 @@ Properly escape jdbc setObject() strings to improve security (Barry)
     application examines the system catalogs, additional changes will
     be required due to the introduction of schemas in 7.3; for more
     information, see: <ulink
-    url="http://www.ca.postgresql.org/docs/momjian/upgrade_tips_7.3">
-    http://www.ca.postgresql.org/docs/momjian/upgrade_tips_7.3</>.
+    url="http://developer.postgresql.org/~momjian/upgrade_tips_7.3">
+    http://developer.postgresql.org/~momjian/upgrade_tips_7.3</>.
    </para>
 
    <para>
@@ -4901,7 +4901,7 @@ Contributors (appologies to any missed)
  * david bennett <[email protected]>
  * Julian Assange <[email protected]>
- * Bruce Momjian <maillist@candle.pha.pa.us>
+ * Bruce Momjian <pgman@candle.pha.pa.us>
  * Paul "Shag" Walmsley <[email protected]>
  * "Alistair G. Crooks" <[email protected]>
 -->
index 66d20cb11b73d1e20333a6893177881b57bca842..2d485b4d595ce34316c8aa24c4b7ef590e81150a 100644 (file)
@@ -1,10 +1,10 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.28 2003/04/11 13:22:35 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.28.2.1 2003/09/07 04:36:43 momjian Exp $ -->
 
 <Chapter Id="rules">
 <Title>The Rule System</Title>
 
  <indexterm zone="rules">
-  <primary>rules</primary>
+  <primary>rule</primary>
  </indexterm>
 
 <Para>
 <Sect1 id="querytree">
 <Title>The Query Tree</Title>
 
+<indexterm zone="querytree">
+ <primary>query tree</primary>
+</indexterm>
+
 <Para>
     To understand how the rule system works it is necessary to know
     when it is invoked and what its input and results are.
     <Term>
         the target list
     </Term>
+    <indexterm><primary>target list</></>
     <ListItem>
     <Para>
         The target list is a list of expressions that define the
 
 <Sect1 id="rules-views">
 <Title>Views and the Rule System</Title>
-<indexterm zone="rules-views"><primary>rules</><secondary>and views</></>
+
+<indexterm zone="rules-views">
+ <primary>rule</primary>
+ <secondary>and views</secondary>
+</indexterm>
+
+<indexterm zone="rules-views">
+ <primary>view</>
+ <secondary>implementation through rules</>
+</indexterm>
 
 <Para>
     Views in <ProductName>PostgreSQL</ProductName> are implemented
@@ -286,9 +300,14 @@ CREATE RULE "_RETURN" AS ON SELECT TO myview DO INSTEAD
     same thing: relations.
 </Para>
 
-<Sect2>
+<Sect2 id="rules-select">
 <Title>How <command>SELECT</command> Rules Work</Title>
 
+<indexterm zone="rules-select">
+ <primary>rule</primary>
+ <secondary sortas="SELECT">for SELECT</secondary>
+</indexterm>
+
 <Para>
     Rules <literal>ON SELECT</> are applied to all queries as the last step, even
     if the command given is an <command>INSERT</command>,
@@ -736,7 +755,7 @@ SELECT t1.a, t2.b FROM t1, t2 WHERE t1.a = t2.a;
     To resolve this problem, another entry is added to the target list
     in <command>UPDATE</command> (and also in
     <command>DELETE</command>) statements: the current tuple ID
-    (<acronym>CTID</>).  This is a system column containing the
+    (<acronym>CTID</>).<indexterm><primary>CTID</></>  This is a system column containing the
     file block number and position in the block for the row. Knowing
     the table, the <acronym>CTID</> can be used to retrieve the
     original row of <literal>t1</> to be updated.  After adding the <acronym>CTID</>
@@ -817,6 +836,21 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
 <Sect1 id="rules-update">
 <Title>Rules on <command>INSERT</>, <command>UPDATE</>, and <command>DELETE</></Title>
 
+<indexterm zone="rules-update">
+ <primary>rule</primary>
+ <secondary sortas="INSERT">for INSERT</secondary>
+</indexterm>
+
+<indexterm zone="rules-update">
+ <primary>rule</primary>
+ <secondary sortas="UPDATE">for UPDATE</secondary>
+</indexterm>
+
+<indexterm zone="rules-update">
+ <primary>rule</primary>
+ <secondary sortas="DELETE">for DELETE</secondary>
+</indexterm>
+
 <Para>
     Rules that are defined on <command>INSERT</>, <command>UPDATE</>,
     and <command>DELETE</> are significantly different from the view rules
@@ -1243,7 +1277,7 @@ SELECT shoelace_data.sl_name, 0,
 <Sect2 id="rules-update-views">
 <Title>Cooperation with Views</Title>
 
-<indexterm zone="rules-update-views"><primary>views</><secondary>updating</></>
+<indexterm zone="rules-update-views"><primary>view</><secondary>updating</></>
 
 <Para>
     A simple way to protect view relations from the mentioned
@@ -1654,6 +1688,16 @@ SELECT * FROM shoelace;
 <Sect1 id="rules-privileges">
 <Title>Rules and Privileges</Title>
 
+<indexterm zone="rules-privileges">
+ <primary>privilege</primary>
+ <secondary sortas="Regeln">with rules</secondary>
+</indexterm>
+
+<indexterm zone="rules-privileges">
+ <primary>privilege</primary>
+ <secondary sortas="Sichten">with views</secondary>
+</indexterm>
+
 <Para>
     Due to rewriting of queries by the <ProductName>PostgreSQL</ProductName>
     rule system, other tables/views than those used in the original
@@ -1796,6 +1840,16 @@ GRANT SELECT ON phone_number TO secretary;
 <Sect1 id="rules-triggers">
 <Title>Rules versus Triggers</Title>
 
+<indexterm zone="rules-triggers">
+ <primary>rule</primary>
+ <secondary sortas="Trigger">compared with triggers</secondary>
+</indexterm>
+
+<indexterm zone="rules-triggers">
+ <primary>trigger</primary>
+ <secondary sortas="Regeln">compared with rules</secondary>
+</indexterm>
+
 <Para>
     Many things that can be done using triggers can also be
     implemented using the <ProductName>PostgreSQL</ProductName>
index 6adfd85df0f9d05536636285e15c385728edfbe7..37168a47b0b78e6b94e3e2b10982082b199ee157 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199 2003/08/10 01:20:34 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199.2.1 2003/09/07 04:36:43 momjian Exp $
 -->
 
 <Chapter Id="runtime">
@@ -69,7 +69,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199 2003/08/10 01:20:34 tg
    default, although locations such as
    <filename>/usr/local/pgsql/data</filename> or
    <filename>/var/lib/pgsql/data</filename> are popular. To initialize a
-   database cluster, use the command <command>initdb</command>, which is
+   database cluster, use the command <command>initdb</command>,<indexterm><primary>initdb</></> which is
    installed with <productname>PostgreSQL</productname>. The desired
    file system location of your database system is indicated by the
    <option>-D</option> option, for example
@@ -120,11 +120,13 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
   <para>
    However, while the directory contents are secure, the default
    client authentication setup allows any local user to connect to the
-   database and even become the database superuser. If you do not trust
-   other local users, we recommend you use <command>initdb</command>'s
-   <option>-W</option> or <option>--pwprompt</option> option to assign a
-   password to the database superuser. After <command>initdb</command>,
-   modify the <filename>pg_hba.conf</filename> file to use <literal>md5</> or
+   database and even become the database superuser. If you do not
+   trust other local users, we recommend you use
+   <command>initdb</command>'s <option>-W</option> or
+   <option>--pwprompt</option> option to assign a password to the
+   database superuser.<indexterm><primary>password</><secondary>of the
+   superuser</></indexterm> After <command>initdb</command>, modify
+   the <filename>pg_hba.conf</filename> file to use <literal>md5</> or
    <literal>password</> instead of <literal>trust</> authentication
    <emphasis>before</> you start the server for the first time. (Other
    approaches include using <literal>ident</literal> authentication or
@@ -207,8 +209,9 @@ pg_ctl start -l logfile
 
   <para>
    Normally, you will want to start the database server when the
-   computer boots. Autostart scripts are operating system-specific.
-   There are a few distributed with
+   computer boots.<indexterm><primary>booting</><secondary>starting
+   the server during</></> Autostart scripts are operating
+   system-specific.  There are a few distributed with
    <productname>PostgreSQL</productname> in the
    <filename>contrib/start-scripts</> directory. This may require root
    privileges.
@@ -240,7 +243,7 @@ su -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres
       For <productname>FreeBSD</productname>, look at the file
       <filename>contrib/start-scripts/freebsd</filename> in the
       <productname>PostgreSQL</productname> source distribution.
-      <indexterm><primary>FreeBSD</></>
+      <indexterm><primary>FreeBSD</><secondary>start script</secondary></>
      </para>
     </listitem>
 
@@ -248,7 +251,7 @@ su -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres
      <para>
       On <productname>OpenBSD</productname>, add the following lines
       to the file <filename>/etc/rc.local</filename>:
-      <indexterm><primary>OpenBSD</></>
+      <indexterm><primary>OpenBSD</><secondary>start script</secondary></>
 <programlisting>
 if [ -x /usr/local/pgsql/bin/pg_ctl -a -x /usr/local/pgsql/bin/postmaster ]; then
     su - -c '/usr/local/pgsql/bin/pg_ctl start -l /var/postgresql/log -s' postgres
@@ -261,7 +264,7 @@ fi
     <listitem>
      <para>
       On <productname>Linux</productname> systems either add
-      <indexterm><primary>Linux</></>
+      <indexterm><primary>Linux</><secondary>start script</secondary></>
 <programlisting>
 /usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data
 </programlisting>
@@ -276,7 +279,7 @@ fi
       On <productname>NetBSD</productname>, either use the
       <productname>FreeBSD</productname> or
       <productname>Linux</productname> start scripts, depending on
-      preference. <indexterm><primary>NetBSD</></>
+      preference. <indexterm><primary>NetBSD</><secondary>start script</secondary></>
      </para>
     </listitem>
 
@@ -285,7 +288,7 @@ fi
       On <productname>Solaris</productname>, create a file called
       <filename>/etc/init.d/postgresql</filename> that contains
       the following line:
-      <indexterm><primary>Solaris</></>
+      <indexterm><primary>Solaris</><secondary>start script</secondary></>
 <programlisting>
 su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data"
 </programlisting>
@@ -441,7 +444,7 @@ psql: could not connect to server: Connection refused
 
    <indexterm>
     <primary>configuration</primary>
-    <secondary>server</secondary>
+    <secondary>of the server</secondary>
    </indexterm>
 
    <para>
@@ -462,7 +465,7 @@ psql: could not connect to server: Connection refused
 
    <para>
     One way to set these options is to edit the file
-    <filename>postgresql.conf</filename> in the data directory. (A
+    <filename>postgresql.conf</filename><indexterm><primary>postgresql.conf</></> in the data directory. (A
     default file is installed there.) An example of what this file might
     look like is:
 <programlisting>
@@ -626,7 +629,7 @@ SET ENABLE_SEQSCAN TO OFF;
       <term><varname>TCPIP_SOCKET</varname> (<type>boolean</type>)</term>
       <listitem>
        <para>
-        If this is true, then the server will accept TCP/IP connections.
+        If this is true, then the server will accept TCP/IP connections.<indexterm><primary>TCP/IP</></>
         Otherwise only local Unix domain socket connections are
         accepted. It is off by default. This option can only be set at
         server start.
@@ -781,7 +784,8 @@ SET ENABLE_SEQSCAN TO OFF;
      <variablelist>
      <varlistentry>
       <term><varname>AUTHENTICATION_TIMEOUT</varname> (<type>integer</type>)</term>
-      <indexterm><primary>timeout</><secondary>authentication</></indexterm>
+      <indexterm><primary>timeout</><secondary>client authentication</></indexterm>
+      <indexterm><primary>client authentication</><secondary>timeout during</></indexterm>
       <listitem>
        <para>
         Maximum time to complete client authentication, in seconds. If a
@@ -1514,8 +1518,17 @@ SET ENABLE_SEQSCAN TO OFF;
    <sect2 id="runtime-config-logging">
     <title>Error Reporting and Logging</title>
 
+    <indexterm zone="runtime-config-logging">
+     <primary>server log</primary>
+    </indexterm>
+
     <sect3 id="runtime-config-logging-syslog">
      <title>Syslog</title>
+
+     <indexterm zone="runtime-config-logging-syslog">
+      <primary>syslog</primary>
+     </indexterm>
+
      <variablelist>
 
      <varlistentry>
@@ -2137,7 +2150,7 @@ SET ENABLE_SEQSCAN TO OFF;
 
      <varlistentry>
       <term><varname>AUSTRALIAN_TIMEZONES</varname> (<type>boolean</type>)</term>
-      <indexterm><primary>Australian time zones</></>
+      <indexterm><primary>time zone</><secondary>Australian</></>
       <listitem>
        <para>
         If set to true, <literal>ACST</literal>,
@@ -2154,8 +2167,8 @@ SET ENABLE_SEQSCAN TO OFF;
        <primary>significant digits</primary>
       </indexterm>
       <indexterm>
-       <primary>display</primary>
-       <secondary>of float numbers</secondary>
+       <primary>floating-point</primary>
+       <secondary>display</secondary>
       </indexterm>
 
       <term><varname>EXTRA_FLOAT_DIGITS</varname> (<type>integer</type>)</term>
@@ -2175,7 +2188,7 @@ SET ENABLE_SEQSCAN TO OFF;
 
      <varlistentry>
       <term><varname>CLIENT_ENCODING</varname> (<type>string</type>)</term>
-      <indexterm><primary>character set encoding</></>
+      <indexterm><primary>character set</></>
       <listitem>
        <para>
         Sets the client-side encoding (character set).
@@ -2338,7 +2351,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
      <varlistentry>
       <indexterm>
        <primary>deadlock</primary>
-       <secondary>timeout</secondary>
+       <secondary>timeout during</secondary>
       </indexterm>
       <indexterm>
        <primary>timeout</primary>
@@ -2388,14 +2401,22 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
     <title>Version and Platform Compatibility</title>
 
     <sect3 id="runtime-config-compatible-version">
-     <title>Previous Postgres Versions</title>
+     <title>Previous PostgreSQL Versions</title>
      <variablelist>
 
      <varlistentry>
       <term><varname>ADD_MISSING_FROM</varname> (<type>boolean</type>)</term>
-      <indexterm><primary>missing from</></>
+      <indexterm><primary>FROM</><secondary>missing</></>
       <listitem>
        <para>
+        When <literal>true</>, tables that are referenced by a query will be
+       automatically added to the <literal>FROM</> clause if not already
+       present.  The default is <literal>true</> for compatibility with
+       previous releases of <productname>PostgreSQL</>.  However, this
+       behavior is not SQL-standard, and many people dislike it because it
+       can mask mistakes.  Set to <literal>false</> for the SQL-standard
+       behavior of rejecting references to tables that are not listed in
+       <literal>FROM</>.
        </para>
       </listitem>
      </varlistentry>
@@ -2905,7 +2926,7 @@ $ <userinput>postmaster -o '-S 1024 -s'</userinput>
 
      <varlistentry>
       <term><systemitem class="osname">BSD/OS</></term>
-      <indexterm><primary>BSD/OS</></>
+      <indexterm><primary>BSD/OS</><secondary>IPC configuration</></>
       <listitem>
        <formalpara>
         <title>Shared Memory</>
@@ -2966,9 +2987,9 @@ options "SEMMNS=240"
       <term><systemitem class="osname">FreeBSD</></term>
       <term><systemitem class="osname">NetBSD</></term>
       <term><systemitem class="osname">OpenBSD</></term>
-      <indexterm><primary>FreeBSD</></>
-      <indexterm><primary>NetBSD</></>
-      <indexterm><primary>OpenBSD</></>
+      <indexterm><primary>FreeBSD</><secondary>IPC configuration</></>
+      <indexterm><primary>NetBSD</><secondary>IPC configuration</></>
+      <indexterm><primary>OpenBSD</><secondary>IPC configuration</></>
       <listitem>
        <para>
         The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need
@@ -3002,7 +3023,7 @@ options         SEMMAP=256
 
      <varlistentry>
       <term><systemitem class="osname">HP-UX</></term>
-      <indexterm><primary>HP-UX</></>
+      <indexterm><primary>HP-UX</><secondary>IPC configuration</></>
       <listitem>
        <para>
         The default settings tend to suffice for normal installations.
@@ -3023,7 +3044,7 @@ options         SEMMAP=256
 
      <varlistentry>
       <term><systemitem class="osname">Linux</></term>
-      <indexterm><primary>Linux</></>
+      <indexterm><primary>Linux</><secondary>IPC configuration</></>
       <listitem>
        <para>
         The default shared memory limit (both
@@ -3060,14 +3081,61 @@ kernel.shmmax = 134217728
        </para>
 
        <para>
-        Linux has poor default memory overcommit behavior.  Rather than
-        failing if it can not reserve enough memory, it returns success, 
-        but later fails when the memory can't be mapped and terminates 
-        the application with <literal>kill -9</>.  To prevent unpredictable 
-        process termination, use:
+       Linux kernel version 2.4.* has poor default memory overcommit 
+       behavior, which can result in the postmaster being killed by the 
+       kernel due to memory demands by another process if the system 
+       runs out of memory.
+       </para>
+
+       <para>
+       The symptom of this occuring is a kernel message looking like 
+       this (consult your system documentation and configuration on 
+       where to look for such a message):
+<programlisting>
+ Out of Memory: Killed process 12345 (postmaster). 
+</programlisting>
+       </para>
+
+       <para>
+       To avoid this situation, run <productname>PostgreSQL</productname> 
+       on a machine where you 
+       can be sure that other processes will not run the machine out 
+       of memory. If your kernel supports strict and/or paranoid modes 
+       of overcommit handling, you can also relieve this problem by 
+       altering the system's default behaviour. This can be determined 
+       by examining the function <function>vm_enough_memory</>
+       in the file <filename>mm/mmap.c</> in the kernel source. 
+       If this file reveals that strict and/or paranoid modes are 
+       supported by your kernel, turn one of these modes on by using
+<programlisting>
+sysctl -w vm.overcommit_memory=2
+</programlisting>
+        for strict mode or
 <programlisting>
 sysctl -w vm.overcommit_memory=3
 </programlisting>
+       for paranoid mode, or placing an equivalent entry in 
+       <filename>/etc/sysctl.conf</>.
+       </para>
+
+       <note>
+       <para>
+        Warning: using these settings in a kernel which does not support 
+        these modes will almost certainly increase the danger of the 
+        kernel killing the postmaster, rather than reducing it. 
+        If in any doubt, consult a kernel expert or your kernel vendor.
+       </para>
+       </note>
+
+       <para>
+       These modes are expected to be supported in all 2.6 and later 
+       kernels. Some vendor 2.4 kernels may also support these modes. 
+       However, it is known that some vendor documents suggest that 
+       they support them while examination of the kernel source reveals 
+       that they do not.
+       </para>
+
+       <para>
         Note, you will need enough swap space to cover all your memory needs.
        </para>
       </listitem>
@@ -3076,7 +3144,7 @@ sysctl -w vm.overcommit_memory=3
 
      <varlistentry>
       <term><systemitem class="osname">MacOS X</></term>
-      <indexterm><primary>MacOS X</></>
+      <indexterm><primary>MacOS X</><secondary>IPC configuration</></>
       <listitem>
        <para>
         Edit the file
@@ -3096,7 +3164,7 @@ sysctl -w kern.sysv.shmall
 
      <varlistentry>
       <term><systemitem class="osname">SCO OpenServer</></term>
-      <indexterm><primary>SCO OpenServer</></>
+      <indexterm><primary>SCO OpenServer</><secondary>IPC configuration</></>
       <listitem>
        <para>
         In the default configuration, only 512 kB of shared memory per
@@ -3124,7 +3192,7 @@ sysctl -w kern.sysv.shmall
 
      <varlistentry>
       <term><systemitem class="osname">Solaris</></term>
-      <indexterm><primary>Solaris</></>
+      <indexterm><primary>Solaris</><secondary>IPC configuration</></>
       <listitem>
        <para>
         At least in version 2.6, the default maximum size of a shared
@@ -3157,7 +3225,7 @@ set semsys:seminfo_semmsl=32
 
      <varlistentry>
       <term><systemitem class="osname">UnixWare</></term>
-      <indexterm><primary>UnixWare</></>
+      <indexterm><primary>UnixWare</><secondary>IPC configuration</></>
       <listitem>
        <para>
         On <productname>UnixWare</> 7, the maximum size for shared
@@ -3277,13 +3345,17 @@ default:\
  <sect1 id="postmaster-shutdown">
   <title>Shutting Down the Server</title>
 
+  <indexterm zone="postmaster-shutdown">
+   <primary>shutdown</>
+  </indexterm>
+
   <para>
    There are several ways to shut down the database server. You control
    the type of shutdown by sending different signals to the server
    process.
    <variablelist>
     <varlistentry>
-     <term><systemitem>SIGTERM</systemitem></term>
+     <term><systemitem>SIGTERM</systemitem><indexterm><primary>SIGTERM</></></term>
      <listitem>
       <para>
        After receiving <systemitem>SIGTERM</systemitem>, the server
@@ -3296,7 +3368,7 @@ default:\
     </varlistentry>
 
     <varlistentry>
-     <term><systemitem>SIGINT</systemitem></term>
+     <term><systemitem>SIGINT</systemitem><indexterm><primary>SIGINT</></></term>
      <listitem>
       <para>
        The server disallows new connections and sends all existing
@@ -3309,7 +3381,7 @@ default:\
     </varlistentry>
 
     <varlistentry>
-     <term><systemitem>SIGQUIT</systemitem></term>
+     <term><systemitem>SIGQUIT</systemitem><indexterm><primary>SIGQUIT</></></term>
      <listitem>
       <para>
       This is the <firstterm>Immediate Shutdown</firstterm>, which
index b3c65204c440e648a4a72c6cd80acb71cb64e490..795db64a6bf8bcde2367af6d84e1a5535a82175d 100644 (file)
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v 1.25 2003/01/21 22:06:11 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v 1.25.2.1 2003/09/07 04:36:44 momjian Exp $
 -->
 
-<Chapter id="spi">
-<DocInfo>
-<AuthorGroup>
-<Author>
-<FirstName>Vadim</FirstName>
-<Surname>Mikheev</Surname>
-</Author>
-</AuthorGroup>
-<Date>Transcribed 1998-01-16</Date>
-</DocInfo>
-
-<Title>Server Programming Interface</Title>
-
-<Para>
-The <FirstTerm>Server Programming Interface</FirstTerm> 
-(<Acronym>SPI</Acronym>) gives users the
-ability to run <Acronym>SQL</Acronym> queries inside user-defined 
-<Acronym>C</Acronym> functions.
-</Para>
-
-<note>
-<para>
-The available Procedural Languages (<Acronym>PL</Acronym>) give an alternate
-means to build functions that can execute queries.
-</para>
-</note>
-
-<Para>
-In fact, <Acronym>SPI</Acronym> is just a set of native interface functions
-to simplify access to the Parser, Planner, Optimizer and Executor. 
-<Acronym>SPI</Acronym> also does some memory management.
-</Para>
-
-<Para>
-To avoid misunderstanding we'll use <FirstTerm>function</FirstTerm> 
-to mean <Acronym>SPI</Acronym> interface functions and 
-<FirstTerm>procedure</FirstTerm> for user-defined C-functions 
-using <Acronym>SPI</Acronym>.
-</Para>
-
-<Para>
-Procedures which use <Acronym>SPI</Acronym> are called by the
-Executor.  The <Acronym>SPI</Acronym> calls recursively invoke the
-Executor in turn to run queries.  When the Executor is invoked
-recursively, it may itself call procedures which may make
-<Acronym>SPI</Acronym> calls.
-</Para>
-
-<Para>
-Note that if during execution of a query from a procedure the transaction is
-aborted, then control will not be returned to your procedure. Rather, all work
-will be rolled back and the server will wait for the next command from the
-client.  This will probably be changed in future versions.
-</Para>
-
-<Para>
-A related restriction is the inability to execute BEGIN, END and ABORT
-(transaction control statements).  This will also be
-changed in the future.
-</Para>
-
-<Para>
-If successful, <Acronym>SPI</Acronym> functions return a non-negative result (either via
-a returned integer value or in SPI_result global variable, as described below).
-On error, a negative or NULL result will be returned.
-</Para>
-
-<Sect1 id="spi-interface">
-<Title>Interface Functions</Title>
-
-<REFENTRY ID="SPI-SPICONNECT">
-<REFMETA>
-<REFENTRYTITLE>SPI_connect</REFENTRYTITLE>
-<REFMISCINFO>SPI - Connection Management</REFMISCINFO>
-</REFMETA>
-<REFNAMEDIV>
-<REFNAME>SPI_connect
-</REFNAME>
-<REFPURPOSE>
-   Connects your procedure to the SPI manager.
-</REFPURPOSE>
-<INDEXTERM ID="IX-SPI-SPICONNECT-1"><PRIMARY>SPI</PRIMARY><SECONDARY>connecting</SECONDARY></INDEXTERM>
-<INDEXTERM ID="IX-SPI-SPICONNECT-2"><PRIMARY>SPI_connect</PRIMARY></INDEXTERM>
-</REFNAMEDIV>
-<REFSYNOPSISDIV>
-<REFSYNOPSISDIVINFO>
-<DATE>1997-12-24</DATE>
-</REFSYNOPSISDIVINFO>
-<SYNOPSIS>
+<chapter id="spi">
+ <title>Server Programming Interface</title>
+
+ <indexterm zone="spi">
+  <primary>SPI</primary>
+ </indexterm>
+
+ <para>
+  The <firstterm>Server Programming Interface</firstterm>
+  (<acronym>SPI</acronym>) gives users the ability to run
+  <acronym>SQL</acronym> commands inside user-defined
+  <acronym>C</acronym> functions.  <acronym>SPI</acronym> is a set of
+  interface functions to simplify access to the parser, planner,
+  optimizer, and executor. <acronym>SPI</acronym> also does some
+  memory management.
+ </para>
+
+ <para>
+  To avoid misunderstanding we'll use the term <quote>function</quote>
+  when we speak of <acronym>SPI</acronym> interface functions and
+  <quote>procedure</quote> for user-defined C-functions, which may be
+  using <acronym>SPI</acronym>.
+ </para>
+
+ <para>
+  Note that if during the execution of a procedure the transaction is
+  aborted because of an error in a command, then control will not be
+  returned to your procedure.  Rather, all work will be rolled back
+  and the server will wait for the next command from the client.  A
+  related restriction is the inability to execute
+  <command>BEGIN</command>, <command>COMMIT</command>, and
+  <command>ROLLBACK</command> (transaction control statements) inside
+  a procedure.  Both of these restrictions will probably be changed in
+  the future.
+ </para>
+
+ <para>
+  <acronym>SPI</acronym> functions return a nonnegative result on
+  success (either via a returned integer value or in the global
+  variable <varname>SPI_result</varname>, as described below).  On
+  error, a negative result or <symbol>NULL</symbol> will be returned.
+ </para>
+
+ <para>
+  Source code files that use SPI must include the header file
+  <filename>executor/spi.h</filename>.
+ </para>
+
+ <note>
+  <para>
+   The available procedural languages provide different means to
+   execute SQL commands from procedures.  Some of these are modelled
+   after SPI, so this documentation might be of use for those users as
+   well.
+  </para>
+ </note>
+
+
+<sect1 id="spi-interface">
+ <title>Interface Functions</title>
+
+ <refentry id="spi-spi-connect">
+  <refmeta>
+   <refentrytitle>SPI_connect</refentrytitle>
+  </refmeta>
+
+  <refnamediv>
+   <refname>SPI_connect</refname>
+   <refpurpose>connect a procedure to the SPI manager</refpurpose>
+ </refnamediv>
+
+ <indexterm><primary>SPI_connect</primary></indexterm>
+
+ <refsynopsisdiv>
+<synopsis>
 int SPI_connect(void)
-</SYNOPSIS>
-
-<REFSECT2 ID="R2-SPI-SPICONNECT-1">
-<REFSECT2INFO>
-<DATE>1997-12-24</DATE>
-</REFSECT2INFO>
-<TITLE>Inputs
-</TITLE>
-<PARA>None
-</PARA>
-</REFSECT2>
-
-<REFSECT2 ID="R2-SPI-SPICONNECT-2">