Commit 3c49c6fa authored by Peter Eisentraut's avatar Peter Eisentraut

Convert documentation to DocBook XML

Since some preparation work had already been done, the only source
changes left were changing empty-element tags like <xref linkend="foo">
to <xref linkend="foo"/>, and changing the DOCTYPE.

The source files are still named *.sgml, but they are actually XML files
now.  Renaming could be considered later.

In the build system, the intermediate step to convert from SGML to XML
is removed.  Everything is build straight from the source files again.
The OpenSP (or the old SP) package is no longer needed.

The documentation toolchain instructions are updated and are much
simpler now.

Peter Eisentraut, Alexander Lakhin, Jürgen Purtz
parent 2f8d6369
# config/docbook.m4
# PGAC_PROG_NSGMLS
# ----------------
AC_DEFUN([PGAC_PROG_NSGMLS],
[PGAC_PATH_PROGS(NSGMLS, [onsgmls nsgmls])])
# PGAC_PATH_XMLLINT
# -----------------
AC_DEFUN([PGAC_PATH_XMLLINT],
[PGAC_PATH_PROGS(XMLLINT, xmllint)])
# PGAC_CHECK_DOCBOOK(VERSION)
# ---------------------------
AC_DEFUN([PGAC_CHECK_DOCBOOK],
[AC_REQUIRE([PGAC_PROG_NSGMLS])
AC_CACHE_CHECK([for DocBook V$1], [pgac_cv_check_docbook],
[cat >conftest.sgml <<EOF
<!doctype book PUBLIC "-//OASIS//DTD DocBook V$1//EN">
[AC_REQUIRE([PGAC_PATH_XMLLINT])
AC_CACHE_CHECK([for DocBook XML V$1], [pgac_cv_check_docbook],
[cat >conftest.xml <<EOF
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V$1//EN" "http://www.oasis-open.org/docbook/xml/$1/docbookx.dtd">
<book>
<title>test</title>
<chapter>
......@@ -27,13 +27,13 @@ EOF
pgac_cv_check_docbook=no
if test -n "$NSGMLS"; then
$NSGMLS -s conftest.sgml 1>&AS_MESSAGE_LOG_FD 2>&1
if test -n "$XMLLINT"; then
$XMLLINT --noout --valid conftest.xml 1>&AS_MESSAGE_LOG_FD 2>&1
if test $? -eq 0; then
pgac_cv_check_docbook=yes
fi
fi
rm -f conftest.sgml])
rm -f conftest.xml])
have_docbook=$pgac_cv_check_docbook
AC_SUBST([have_docbook])
......
......@@ -630,12 +630,10 @@ vpath_build
PG_VERSION_NUM
PROVE
FOP
OSX
XSLTPROC
XMLLINT
DBTOEPUB
have_docbook
NSGMLS
XMLLINT
TCL_SHLIB_LD_LIBS
TCL_SHARED_BUILD
TCL_LIB_SPEC
......@@ -16132,19 +16130,19 @@ fi
#
# Check for DocBook and tools
#
if test -z "$NSGMLS"; then
for ac_prog in onsgmls nsgmls
if test -z "$XMLLINT"; then
for ac_prog in xmllint
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_NSGMLS+:} false; then :
if ${ac_cv_path_XMLLINT+:} false; then :
$as_echo_n "(cached) " >&6
else
case $NSGMLS in
case $XMLLINT in
[\\/]* | ?:[\\/]*)
ac_cv_path_NSGMLS="$NSGMLS" # Let the user override the test with a path.
ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -16154,7 +16152,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_NSGMLS="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -16165,35 +16163,35 @@ IFS=$as_save_IFS
;;
esac
fi
NSGMLS=$ac_cv_path_NSGMLS
if test -n "$NSGMLS"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
$as_echo "$NSGMLS" >&6; }
XMLLINT=$ac_cv_path_XMLLINT
if test -n "$XMLLINT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
$as_echo "$XMLLINT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$NSGMLS" && break
test -n "$XMLLINT" && break
done
else
# Report the value of NSGMLS in configure's output in all cases.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSGMLS" >&5
$as_echo_n "checking for NSGMLS... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
$as_echo "$NSGMLS" >&6; }
# Report the value of XMLLINT in configure's output in all cases.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
$as_echo_n "checking for XMLLINT... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
$as_echo "$XMLLINT" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
$as_echo_n "checking for DocBook V4.2... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
$as_echo_n "checking for DocBook XML V4.2... " >&6; }
if ${pgac_cv_check_docbook+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.sgml <<EOF
<!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
cat >conftest.xml <<EOF
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book>
<title>test</title>
<chapter>
......@@ -16208,13 +16206,13 @@ EOF
pgac_cv_check_docbook=no
if test -n "$NSGMLS"; then
$NSGMLS -s conftest.sgml 1>&5 2>&1
if test -n "$XMLLINT"; then
$XMLLINT --noout --valid conftest.xml 1>&5 2>&1
if test $? -eq 0; then
pgac_cv_check_docbook=yes
fi
fi
rm -f conftest.sgml
rm -f conftest.xml
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
$as_echo "$pgac_cv_check_docbook" >&6; }
......@@ -16276,60 +16274,6 @@ $as_echo_n "checking for DBTOEPUB... " >&6; }
$as_echo "$DBTOEPUB" >&6; }
fi
if test -z "$XMLLINT"; then
for ac_prog in xmllint
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_XMLLINT+:} false; then :
$as_echo_n "(cached) " >&6
else
case $XMLLINT in
[\\/]* | ?:[\\/]*)
ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
XMLLINT=$ac_cv_path_XMLLINT
if test -n "$XMLLINT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
$as_echo "$XMLLINT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$XMLLINT" && break
done
else
# Report the value of XMLLINT in configure's output in all cases.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
$as_echo_n "checking for XMLLINT... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
$as_echo "$XMLLINT" >&6; }
fi
if test -z "$XSLTPROC"; then
for ac_prog in xsltproc
do
......@@ -16384,60 +16328,6 @@ $as_echo_n "checking for XSLTPROC... " >&6; }
$as_echo "$XSLTPROC" >&6; }
fi
if test -z "$OSX"; then
for ac_prog in osx sgml2xml sx
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_OSX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $OSX in
[\\/]* | ?:[\\/]*)
ac_cv_path_OSX="$OSX" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_OSX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
OSX=$ac_cv_path_OSX
if test -n "$OSX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
$as_echo "$OSX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$OSX" && break
done
else
# Report the value of OSX in configure's output in all cases.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX" >&5
$as_echo_n "checking for OSX... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
$as_echo "$OSX" >&6; }
fi
if test -z "$FOP"; then
for ac_prog in fop
do
......
......@@ -2091,12 +2091,10 @@ fi
#
# Check for DocBook and tools
#
PGAC_PROG_NSGMLS
PGAC_PATH_XMLLINT
PGAC_CHECK_DOCBOOK(4.2)
PGAC_PATH_PROGS(DBTOEPUB, dbtoepub)
PGAC_PATH_PROGS(XMLLINT, xmllint)
PGAC_PATH_PROGS(XSLTPROC, xsltproc)
PGAC_PATH_PROGS(OSX, [osx sgml2xml sx])
PGAC_PATH_PROGS(FOP, fop)
#
......
......@@ -37,15 +37,7 @@ ifndef FOP
FOP = $(missing) fop
endif
SGMLINCLUDE = -D . -D $(srcdir)
ifndef NSGMLS
NSGMLS = $(missing) nsgmls
endif
ifndef OSX
OSX = $(missing) osx
endif
XMLINCLUDE = --path .
ifndef XMLLINT
XMLLINT = $(missing) xmllint
......@@ -63,19 +55,6 @@ GENERATED_SGML = version.sgml \
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML)
# Enable some extra warnings
# -wfully-tagged needed to throw a warning on missing tags
# for older tool chains, 2007-08-31
# -wnet catches XML-style empty-element tags like <xref linkend="abc"/>.
override SPFLAGS += -wall -wno-unused-param -wfully-tagged -wnet
# Additional warnings for XML compatibility. The conditional is meant
# to detect whether we are using OpenSP rather than the ancient
# original SP.
override SPFLAGS += -wempty
ifneq (,$(filter o%,$(notdir $(OSX))))
override SPFLAGS += -wdata-delim -winstance-ignore-ms -winstance-include-ms -winstance-param-entity
endif
##
## Man pages
......@@ -83,9 +62,9 @@ endif
man distprep-man: man-stamp
man-stamp: stylesheet-man.xsl postgres.xml
$(XMLLINT) --noout --valid postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
man-stamp: stylesheet-man.xsl postgres.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $(wordlist 1,2,$^)
touch $@
......@@ -136,27 +115,8 @@ INSTALL.html: %.html : stylesheet-text.xsl %.xml
$(XMLLINT) --noout --valid $*.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^ >$@
INSTALL.xml: standalone-profile.xsl standalone-install.xml postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(wordlist 1,2,$^) >$@
##
## SGML->XML conversion
##
# For obscure reasons, GNU make 3.81 complains about circular dependencies
# if we try to do "make all" in a VPATH build without the explicit
# $(srcdir) on the postgres.sgml dependency in this rule. GNU make bug?
postgres.xml: $(srcdir)/postgres.sgml $(ALLSGML)
$(OSX) $(SPFLAGS) $(SGMLINCLUDE) -x lower $< >$@.tmp
$(call mangle-xml,book)
define mangle-xml
$(PERL) -p -e 's/\[(aacute|acirc|aelig|agrave|amp|aring|atilde|auml|bull|copy|eacute|egrave|gt|iacute|lt|mdash|nbsp|ntilde|oacute|ocirc|oslash|ouml|pi|quot|scaron|uuml) *\]/\&\1;/gi;' \
-e '$$_ .= qq{<!DOCTYPE $(1) PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\n} if $$. == 1;' \
<$@.tmp > $@
rm $@.tmp
endef
INSTALL.xml: standalone-profile.xsl standalone-install.xml postgres.sgml $(ALLSGML)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(wordlist 1,2,$^) >$@
##
......@@ -169,20 +129,20 @@ endif
html: html-stamp
html-stamp: stylesheet.xsl postgres.xml
$(XMLLINT) --noout --valid postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^
html-stamp: stylesheet.xsl postgres.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^)
cp $(srcdir)/stylesheet.css html/
touch $@
htmlhelp: stylesheet-hh.xsl postgres.xml
$(XMLLINT) --noout --valid postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $^
htmlhelp: stylesheet-hh.xsl postgres.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(wordlist 1,2,$^)
# single-page HTML
postgres.html: stylesheet-html-nochunk.xsl postgres.xml
$(XMLLINT) --noout --valid postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) -o $@ $^
postgres.html: stylesheet-html-nochunk.xsl postgres.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) -o $@ $(wordlist 1,2,$^)
# single-page text
postgres.txt: postgres.html
......@@ -196,13 +156,13 @@ postgres.txt: postgres.html
postgres.pdf:
$(error Invalid target; use postgres-A4.pdf or postgres-US.pdf as targets)
%-A4.fo: stylesheet-fo.xsl %.xml
$(XMLLINT) --noout --valid $*.xml
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $^
%-A4.fo: stylesheet-fo.xsl %.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^)
%-US.fo: stylesheet-fo.xsl %.xml
$(XMLLINT) --noout --valid $*.xml
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $^
%-US.fo: stylesheet-fo.xsl %.sgml $(ALLSGML)
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^)
%.pdf: %.fo
$(FOP) -fo $< -pdf $@
......@@ -213,7 +173,7 @@ postgres.pdf:
##
epub: postgres.epub
postgres.epub: postgres.xml
postgres.epub: postgres.sgml $(ALLSGML)
$(XMLLINT) --noout --valid $<
$(DBTOEPUB) $<
......@@ -226,7 +186,8 @@ DB2X_TEXIXML = db2x_texixml
DB2X_XSLTPROC = db2x_xsltproc
MAKEINFO = makeinfo
%.texixml: %.xml
%.texixml: %.sgml $(ALLSGML)
$(XMLLINT) --noout --valid $<
$(DB2X_XSLTPROC) -s texi -g output-file=$(basename $@) $< -o $@
%.texi: %.texixml
......@@ -242,7 +203,7 @@ MAKEINFO = makeinfo
# Quick syntax check without style processing
check: postgres.sgml $(ALLSGML) check-tabs
$(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<
$(XMLLINT) $(XMLINCLUDE) --noout --valid $<
##
......@@ -312,7 +273,7 @@ check-tabs:
# This allows removing some files from the distribution tarballs while
# keeping the dependencies satisfied.
.SECONDARY: postgres.xml $(GENERATED_SGML)
.SECONDARY: $(GENERATED_SGML)
.SECONDARY: INSTALL.html INSTALL.xml
.SECONDARY: postgres-A4.fo postgres-US.fo
......@@ -326,8 +287,6 @@ clean:
rm -f *.fo *.pdf
# generated SGML files
rm -f $(GENERATED_SGML)
# SGML->XML conversion
rm -f postgres.xml *.tmp
# HTML Help
rm -f htmlhelp.hhp toc.hhc index.hhk
# EPUB
......
......@@ -16,9 +16,9 @@
</para>
<para>
The functions shown in <xref linkend="functions-adminpack-table"> provide
The functions shown in <xref linkend="functions-adminpack-table"/> provide
write access to files on the machine hosting the server. (See also the
functions in <xref linkend="functions-admin-genfile-table">, which
functions in <xref linkend="functions-admin-genfile-table"/>, which
provide read-only access.)
Only files within the database cluster directory can be accessed, but
either a relative or absolute path is allowable.
......@@ -107,18 +107,18 @@
</indexterm>
<para>
<function>pg_logdir_ls</function> returns the start timestamps and path
names of all the log files in the <xref linkend="guc-log-directory">
directory. The <xref linkend="guc-log-filename"> parameter must have its
names of all the log files in the <xref linkend="guc-log-directory"/>
directory. The <xref linkend="guc-log-filename"/> parameter must have its
default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</literal>) to use this
function.
</para>
<para>
The functions shown
in <xref linkend="functions-adminpack-deprecated-table"> are deprecated
in <xref linkend="functions-adminpack-deprecated-table"/> are deprecated
and should not be used in new applications; instead use those shown
in <xref linkend="functions-admin-signal-table">
and <xref linkend="functions-admin-genfile-table">. These functions are
in <xref linkend="functions-admin-signal-table"/>
and <xref linkend="functions-admin-genfile-table"/>. These functions are
provided in <filename>adminpack</filename> only for compatibility with old
versions of <application>pgAdmin</application>.
</para>
......
......@@ -18,12 +18,12 @@
<para>
This chapter will on occasion refer to examples found in <xref
linkend="tutorial-sql"> to change or improve them, so it will be
linkend="tutorial-sql"/> to change or improve them, so it will be
useful to have read that chapter. Some examples from
this chapter can also be found in
<filename>advanced.sql</filename> in the tutorial directory. This
file also contains some sample data to load, which is not
repeated here. (Refer to <xref linkend="tutorial-sql-intro"> for
repeated here. (Refer to <xref linkend="tutorial-sql-intro"/> for
how to use the file.)
</para>
</sect1>
......@@ -37,7 +37,7 @@
</indexterm>
<para>
Refer back to the queries in <xref linkend="tutorial-join">.
Refer back to the queries in <xref linkend="tutorial-join"/>.
Suppose the combined listing of weather records and city location
is of particular interest to your application, but you do not want
to type the query each time you need it. You can create a
......@@ -82,7 +82,7 @@ SELECT * FROM myview;
<para>
Recall the <classname>weather</classname> and
<classname>cities</classname> tables from <xref
linkend="tutorial-sql">. Consider the following problem: You
linkend="tutorial-sql"/>. Consider the following problem: You
want to make sure that no one can insert rows in the
<classname>weather</classname> table that do not have a matching
entry in the <classname>cities</classname> table. This is called
......@@ -129,7 +129,7 @@ DETAIL: Key (city)=(Berkeley) is not present in table "cities".
<para>
The behavior of foreign keys can be finely tuned to your
application. We will not go beyond this simple example in this
tutorial, but just refer you to <xref linkend="ddl">
tutorial, but just refer you to <xref linkend="ddl"/>
for more information. Making correct use of
foreign keys will definitely improve the quality of your database
applications, so you are strongly encouraged to learn about them.
......@@ -447,7 +447,7 @@ FROM empsalary;
<para>
There are options to define the window frame in other ways, but
this tutorial does not cover them. See
<xref linkend="syntax-window-functions"> for details.
<xref linkend="syntax-window-functions"/> for details.
</para>
</footnote>
Here is an example using <function>sum</function>:
......@@ -554,10 +554,10 @@ SELECT sum(salary) OVER w, avg(salary) OVER w
<para>
More details about window functions can be found in
<xref linkend="syntax-window-functions">,
<xref linkend="functions-window">,
<xref linkend="queries-window">, and the
<xref linkend="sql-select"> reference page.
<xref linkend="syntax-window-functions"/>,
<xref linkend="functions-window"/>,
<xref linkend="queries-window"/>, and the
<xref linkend="sql-select"/> reference page.
</para>
</sect1>
......@@ -692,7 +692,7 @@ SELECT name, altitude
<para>
Although inheritance is frequently useful, it has not been integrated
with unique constraints or foreign keys, which limits its usefulness.
See <xref linkend="ddl-inherit"> for more detail.
See <xref linkend="ddl-inherit"/> for more detail.
</para>
</note>
</sect1>
......
......@@ -31,7 +31,7 @@
index scans themselves, which may be user-defined operator class
code. For example, B-Tree index verification relies on comparisons
made with one or more B-Tree support function 1 routines. See <xref
linkend="xindex-support"> for details of operator class support
linkend="xindex-support"/> for details of operator class support
functions.
</para>
<para>
......@@ -192,7 +192,7 @@ ORDER BY c.relpages DESC LIMIT 10;
index that is ordered using an affected collation, simply because
<emphasis>indexed</emphasis> values might happen to have the same
absolute ordering regardless of the behavioral inconsistency. See
<xref linkend="locale"> and <xref linkend="collation"> for
<xref linkend="locale"/> and <xref linkend="collation"/> for
further details about how <productname>PostgreSQL</productname> uses
operating system locales and collations.
</para>
......@@ -210,7 +210,7 @@ ORDER BY c.relpages DESC LIMIT 10;
logical inconsistency to be introduced. One obvious testing
strategy is to call <filename>amcheck</filename> functions continuously
when running the standard regression tests. See <xref
linkend="regress-run"> for details on running the tests.
linkend="regress-run"/> for details on running the tests.
</para>
</listitem>
<listitem>
......@@ -263,7 +263,7 @@ ORDER BY c.relpages DESC LIMIT 10;
There is no general method of repairing problems that
<filename>amcheck</filename> detects. An explanation for the root cause of
an invariant violation should be sought. <xref
linkend="pageinspect"> may play a useful role in diagnosing
linkend="pageinspect"/> may play a useful role in diagnosing
corruption that <filename>amcheck</filename> detects. A <command>REINDEX</command>
may not be effective in repairing corruption.
</para>
......
......@@ -7,7 +7,7 @@
<title>Author</title>
<para>
This chapter originated as part of
<xref linkend="sim98">, Stefan Simkovics'
<xref linkend="sim98"/>, Stefan Simkovics'
Master's Thesis prepared at Vienna University of Technology under the direction
of O.Univ.Prof.Dr. Georg Gottlob and Univ.Ass. Mag. Katrin Seyr.
</para>
......@@ -136,7 +136,7 @@
<para>
The client process can be any program that understands the
<productname>PostgreSQL</productname> protocol described in
<xref linkend="protocol">. Many clients are based on the
<xref linkend="protocol"/>. Many clients are based on the
C-language library <application>libpq</application>, but several independent
implementations of the protocol exist, such as the Java
<application>JDBC</application> driver.
......@@ -317,7 +317,7 @@
<para>
The query rewriter is discussed in some detail in
<xref linkend="rules">, so there is no need to cover it here.
<xref linkend="rules"/>, so there is no need to cover it here.
We will only point out that both the input and the output of the
rewriter are query trees, that is, there is no change in the
representation or level of semantic detail in the trees. Rewriting
......@@ -347,8 +347,8 @@
involving large numbers of join operations. In order to determine
a reasonable (not necessarily optimal) query plan in a reasonable amount
of time, <productname>PostgreSQL</productname> uses a <firstterm>Genetic
Query Optimizer</firstterm> (see <xref linkend="geqo">) when the number of joins
exceeds a threshold (see <xref linkend="guc-geqo-threshold">).
Query Optimizer</firstterm> (see <xref linkend="geqo"/>) when the number of joins
exceeds a threshold (see <xref linkend="guc-geqo-threshold"/>).
</para>
</note>
......@@ -438,7 +438,7 @@
</para>
<para>
If the query uses fewer than <xref linkend="guc-geqo-threshold">
If the query uses fewer than <xref linkend="guc-geqo-threshold"/>
relations, a near-exhaustive search is conducted to find the best
join sequence. The planner preferentially considers joins between any
two relations for which there exist a corresponding join clause in the
......@@ -454,7 +454,7 @@
<para>
When <varname>geqo_threshold</varname> is exceeded, the join
sequences considered are determined by heuristics, as described
in <xref linkend="geqo">. Otherwise the process is the same.
in <xref linkend="geqo"/>. Otherwise the process is the same.
</para>
<para>
......
......@@ -128,7 +128,7 @@ CREATE TABLE tictactoe (
<para>
(These kinds of array constants are actually only a special case of
the generic type constants discussed in <xref
linkend="sql-syntax-constants-generic">. The constant is initially
linkend="sql-syntax-constants-generic"/>. The constant is initially
treated as a string and passed to the array input conversion
routine. An explicit type specification might be necessary.)
</para>
......@@ -192,7 +192,7 @@ INSERT INTO sal_emp
expressions; for instance, string literals are single quoted, instead of
double quoted as they would be in an array literal. The <literal>ARRAY</literal>
constructor syntax is discussed in more detail in
<xref linkend="sql-syntax-array-constructors">.
<xref linkend="sql-syntax-array-constructors"/>.
</para>
</sect2>
......@@ -616,7 +616,7 @@ SELECT * FROM sal_emp WHERE pay_by_quarter[1] = 10000 OR
However, this quickly becomes tedious for large arrays, and is not
helpful if the size of the array is unknown. An alternative method is
described in <xref linkend="functions-comparisons">. The above
described in <xref linkend="functions-comparisons"/>. The above
query could be replaced by:
<programlisting>
......@@ -644,7 +644,7 @@ SELECT * FROM
WHERE pay_by_quarter[s] = 10000;
</programlisting>
This function is described in <xref linkend="functions-srf-subscripts">.
This function is described in <xref linkend="functions-srf-subscripts"/>.
</para>
<para>
......@@ -657,8 +657,8 @@ SELECT * FROM sal_emp WHERE pay_by_quarter &amp;&amp; ARRAY[10000];
</programlisting>
This and other array operators are further described in
<xref linkend="functions-array">. It can be accelerated by an appropriate
index, as described in <xref linkend="indexes-types">.
<xref linkend="functions-array"/>. It can be accelerated by an appropriate
index, as described in <xref linkend="indexes-types"/>.
</para>
<para>
......@@ -755,7 +755,7 @@ SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2
or backslashes disables this and allows the literal string value
<quote>NULL</quote> to be entered. Also, for backward compatibility with
pre-8.2 versions of <productname>PostgreSQL</productname>, the <xref
linkend="guc-array-nulls"> configuration parameter can be turned
linkend="guc-array-nulls"/> configuration parameter can be turned
<literal>off</literal> to suppress recognition of <literal>NULL</literal> as a NULL.
</para>
......@@ -797,7 +797,7 @@ INSERT ... VALUES (E'{"\\\\","\\""}');
with a data type whose input routine also treated backslashes specially,
<type>bytea</type> for example, we might need as many as eight backslashes
in the command to get one backslash into the stored array element.)
Dollar quoting (see <xref linkend="sql-syntax-dollar-quoting">) can be
Dollar quoting (see <xref linkend="sql-syntax-dollar-quoting"/>) can be
used to avoid the need to double backslashes.
</para>
</note>
......@@ -805,7 +805,7 @@ INSERT ... VALUES (E'{"\\\\","\\""}');
<tip>
<para>
The <literal>ARRAY</literal> constructor syntax (see
<xref linkend="sql-syntax-array-constructors">) is often easier to work
<xref linkend="sql-syntax-array-constructors"/>) is often easier to work
with than the array-literal syntax when writing array values in SQL
commands. In <literal>ARRAY</literal>, individual element values are written the
same way they would be written when not members of an array.
......
......@@ -18,7 +18,7 @@
<para>
In order to function, this module must be loaded via
<xref linkend="guc-shared-preload-libraries"> in <filename>postgresql.conf</filename>.
<xref linkend="guc-shared-preload-libraries"/> in <filename>postgresql.conf</filename>.
</para>
<sect2>
......
......@@ -10,7 +10,7 @@
<para>
The <filename>auto_explain</filename> module provides a means for
logging execution plans of slow statements automatically, without
having to run <xref linkend="sql-explain">
having to run <xref linkend="sql-explain"/>
by hand. This is especially helpful for tracking down un-optimized queries
in large applications.
</para>
......@@ -25,8 +25,8 @@ LOAD 'auto_explain';
(You must be superuser to do that.) More typical usage is to preload
it into some or all sessions by including <literal>auto_explain</literal> in
<xref linkend="guc-session-preload-libraries"> or
<xref linkend="guc-shared-preload-libraries"> in
<xref linkend="guc-session-preload-libraries"/> or
<xref linkend="guc-shared-preload-libraries"/> in
<filename>postgresql.conf</filename>. Then you can track unexpectedly slow queries
no matter when they happen. Of course there is a price in overhead for
that.
......
This diff is collapsed.
......@@ -286,6 +286,6 @@ typedef struct BackgroundWorker
<para>
The maximum number of registered background workers is limited by
<xref linkend="guc-max-worker-processes">.
<xref linkend="guc-max-worker-processes"/>.
</para>
</chapter>
......@@ -95,7 +95,7 @@
<para>
The core <productname>PostgreSQL</productname> distribution
includes the <acronym>BRIN</acronym> operator classes shown in
<xref linkend="brin-builtin-opclasses-table">.
<xref linkend="brin-builtin-opclasses-table"/>.
</para>
<para>
......@@ -590,7 +590,7 @@ typedef struct BrinOpcInfo
To write an operator class for a data type that implements a totally
ordered set, it is possible to use the minmax support procedures
alongside the corresponding operators, as shown in
<xref linkend="brin-extensibility-minmax-table">.
<xref linkend="brin-extensibility-minmax-table"/>.
All operator class members (procedures and operators) are mandatory.
</para>
......@@ -648,7 +648,7 @@ typedef struct BrinOpcInfo
To write an operator class for a complex data type which has values
included within another type, it's possible to use the inclusion support
procedures alongside the corresponding operators, as shown
in <xref linkend="brin-extensibility-inclusion-table">. It requires
in <xref linkend="brin-extensibility-inclusion-table"/>. It requires
only a single additional function, which can be written in any language.
More functions can be defined for additional functionality. All operators
are optional. Some operators require other operators, as shown as
......@@ -821,7 +821,7 @@ typedef struct BrinOpcInfo
additional data types to be supported by defining extra sets
of operators. Inclusion operator class operator strategies are dependent
on another operator strategy as shown in
<xref linkend="brin-extensibility-inclusion-table">, or the same
<xref linkend="brin-extensibility-inclusion-table"/>, or the same
operator strategy as themselves. They require the dependency
operator to be defined with the <literal>STORAGE</literal> data type as the
left-hand-side argument and the other supported data type to be the
......
This diff is collapsed.
......@@ -15,8 +15,8 @@
Using the locale features of the operating system to provide
locale-specific collation order, number formatting, translated
messages, and other aspects.
This is covered in <xref linkend="locale"> and
<xref linkend="collation">.
This is covered in <xref linkend="locale"/> and
<xref linkend="collation"/>.
</para>
</listitem>
......@@ -25,7 +25,7 @@
Providing a number of different character sets to support storing text
in all kinds of languages, and providing character set translation
between client and server.
This is covered in <xref linkend="multibyte">.
This is covered in <xref linkend="multibyte"/>.
</para>
</listitem>
</itemizedlist>
......@@ -146,7 +146,7 @@ initdb --locale=sv_SE
the sort order of indexes, so they must be kept fixed, or indexes on
text columns would become corrupt.
(But you can alleviate this restriction using collations, as discussed
in <xref linkend="collation">.)
in <xref linkend="collation"/>.)
The default values for these
categories are determined when <command>initdb</command> is run, and
those values are used when new databases are created, unless
......@@ -157,7 +157,7 @@ initdb --locale=sv_SE
The other locale categories can be changed whenever desired
by setting the server configuration parameters
that have the same name as the locale categories (see <xref
linkend="runtime-config-client-format"> for details). The values
linkend="runtime-config-client-format"/> for details). The values
that are chosen by <command>initdb</command> are actually only written
into the configuration file <filename>postgresql.conf</filename> to
serve as defaults when the server is started. If you remove these
......@@ -267,10 +267,10 @@ initdb --locale=sv_SE
with <literal>LIKE</literal> clauses under a non-C locale, several custom
operator classes exist. These allow the creation of an index that
performs a strict character-by-character comparison, ignoring
locale comparison rules. Refer to <xref linkend="indexes-opclass">
locale comparison rules. Refer to <xref linkend="indexes-opclass"/>
for more information. Another approach is to create indexes using
the <literal>C</literal> collation, as discussed in
<xref linkend="collation">.
<xref linkend="collation"/>.
</para>
</sect2>
......@@ -316,7 +316,7 @@ initdb --locale=sv_SE
<productname>PostgreSQL</productname> speak their preferred language well.
If messages in your language are currently not available or not fully
translated, your assistance would be appreciated. If you want to
help, refer to <xref linkend="nls"> or write to the developers'
help, refer to <xref linkend="nls"/> or write to the developers'
mailing list.
</para>
</sect2>
......@@ -524,7 +524,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
these under one concept than to create another infrastructure for
setting <symbol>LC_CTYPE</symbol> per expression.) Also,
a <literal>libc</literal> collation
is tied to a character set encoding (see <xref linkend="multibyte">).
is tied to a character set encoding (see <xref linkend="multibyte"/>).
The same collation name may exist for different encodings.
</para>
......@@ -605,7 +605,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
for <symbol>LC_COLLATE</symbol> and <symbol>LC_CTYPE</symbol>, or if new
locales are installed in the operating system after the database system
was initialized, then a new collation may be created using
the <xref linkend="sql-createcollation"> command.
the <xref linkend="sql-createcollation"/> command.
New operating system locales can also be imported en masse using
the <link linkend="functions-admin-collation"><function>pg_import_system_collations()</function></link> function.
</para>
......@@ -702,7 +702,7 @@ SELECT a COLLATE "C" &lt; b COLLATE "POSIX" FROM test1;
<para>
If the standard and predefined collations are not sufficient, users can
create their own collation objects using the SQL
command <xref linkend="sql-createcollation">.
command <xref linkend="sql-createcollation"/>.
</para>
<para>
......@@ -730,7 +730,7 @@ CREATE COLLATION german (provider = libc, locale = 'de_DE');
defined in the operating system when the database instance is
initialized, it is not often necessary to manually create new ones.
Reasons might be if a different naming system is desired (in which case
see also <xref linkend="collation-copy">) or if the operating system has
see also <xref linkend="collation-copy"/>) or if the operating system has
been upgraded to provide new locale definitions (in which case see
also <link linkend="functions-admin-collation"><function>pg_import_system_collations()</function></link>).
</para>
......@@ -871,7 +871,7 @@ CREATE COLLATION german (provider = libc, locale = 'de_DE');
<title>Copying Collations</title>
<para>
The command <xref linkend="sql-createcollation"> can also be used to
The command <xref linkend="sql-createcollation"/> can also be used to
create a new collation from an existing collation, which can be useful to
be able to use operating-system-independent collation names in
applications, create compatibility names, or use an ICU-provided collation
......@@ -924,7 +924,7 @@ CREATE COLLATION french FROM "fr-x-icu";
<title>Supported Character Sets</title>
<para>
<xref linkend="charset-table"> shows the character sets available
<xref linkend="charset-table"/> shows the character sets available
for use in <productname>PostgreSQL</productname>.
</para>
......@@ -1392,7 +1392,7 @@ CREATE DATABASE korean WITH ENCODING 'EUC_KR' LC_COLLATE='ko_KR.euckr' LC_CTYPE=
database. When copying any other database, the encoding and locale
settings cannot be changed from those of the source database, because
that might result in corrupt data. For more information see
<xref linkend="manage-ag-templatedbs">.
<xref linkend="manage-ag-templatedbs"/>.
</para>
<para>
......@@ -1449,7 +1449,7 @@ $ <userinput>psql -l</userinput>
character set combinations. The conversion information is stored in the
<literal>pg_conversion</literal> system catalog. <productname>PostgreSQL</productname>
comes with some predefined conversions, as shown in <xref
linkend="multibyte-translation-table">. You can create a new
linkend="multibyte-translation-table"/>. You can create a new
conversion using the SQL command <command>CREATE CONVERSION</command>.
</para>
......@@ -1763,7 +1763,7 @@ $ <userinput>psql -l</userinput>
<listitem>
<para>
<application>libpq</application> (<xref linkend="libpq-control">) has functions to control the client encoding.
<application>libpq</application> (<xref linkend="libpq-control"/>) has functions to control the client encoding.
</para>
</listitem>
......@@ -1812,7 +1812,7 @@ RESET client_encoding;
<listitem>
<para>
Using the configuration variable <xref
linkend="guc-client-encoding">. If the
linkend="guc-client-encoding"/>. If the
<varname>client_encoding</varname> variable is set, that client
encoding is automatically selected when a connection to the
server is made. (This can subsequently be overridden using any
......
This diff is collapsed.
This diff is collapsed.
......@@ -16,14 +16,14 @@
<para>
This appendix covers extensions and other server plug-in modules found in
<literal>contrib</literal>. <xref linkend="contrib-prog"> covers utility
<literal>contrib</literal>. <xref linkend="contrib-prog"/> covers utility
programs.
</para>
<para>
When building from the source distribution, these components are not built
automatically, unless you build the "world" target
(see <xref linkend="build">).
(see <xref linkend="build"/>).
You can build and install all of them by running:
<screen>
<userinput>make</userinput>
......@@ -55,7 +55,7 @@
To make use of one of these modules, after you have installed the code
you need to register the new SQL objects in the database system.
In <productname>PostgreSQL</productname> 9.1 and later, this is done by executing
a <xref linkend="sql-createextension"> command. In a fresh database,
a <xref linkend="sql-createextension"/> command. In a fresh database,
you can simply do
<programlisting>
......@@ -89,16 +89,16 @@ CREATE EXTENSION <replaceable>module_name</replaceable> FROM unpackaged;
This will update the pre-9.1 objects of the module into a proper
<firstterm>extension</firstterm> object. Future updates to the module will be
managed by <xref linkend="sql-alterextension">.
managed by <xref linkend="sql-alterextension"/>.
For more information about extension updates, see
<xref linkend="extend-extensions">.
<xref linkend="extend-extensions"/>.
</para>
<para>
Note, however, that some of these modules are not <quote>extensions</quote>
in this sense, but are loaded into the server in some other way, for instance
by way of
<xref linkend="guc-shared-preload-libraries">. See the documentation of each
<xref linkend="guc-shared-preload-libraries"/>. See the documentation of each
module for details.
</para>
......@@ -163,7 +163,7 @@ pages.
<para>
This appendix and the previous one contain information regarding the modules that
can be found in the <literal>contrib</literal> directory of the
<productname>PostgreSQL</productname> distribution. See <xref linkend="contrib"> for
<productname>PostgreSQL</productname> distribution. See <xref linkend="contrib"/> for
more information about the <literal>contrib</literal> section in general and
server extensions and plug-ins found in <literal>contrib</literal>
specifically.
......@@ -184,7 +184,7 @@ pages.
This section covers <productname>PostgreSQL</productname> client
applications in <literal>contrib</literal>. They can be run from anywhere,
independent of where the database server resides. See
also <xref linkend="reference-client"> for information about client
also <xref linkend="reference-client"/> for information about client
applications that part of the core <productname>PostgreSQL</productname>
distribution.
</para>
......@@ -200,7 +200,7 @@ pages.
This section covers <productname>PostgreSQL</productname> server-related
applications in <literal>contrib</literal>. They are typically run on the
host where the database server resides. See also <xref
linkend="reference-server"> for information about server applications that
linkend="reference-server"/> for information about server applications that
part of the core <productname>PostgreSQL</productname> distribution.
</para>
......
......@@ -16,7 +16,7 @@
<title>Syntax</title>
<para>
<xref linkend="cube-repr-table"> shows the valid external
<xref linkend="cube-repr-table"/> shows the valid external
representations for the <type>cube</type>
type. <replaceable>x</replaceable>, <replaceable>y</replaceable>, etc. denote
floating-point numbers.
......@@ -106,7 +106,7 @@
<title>Usage</title>
<para>
<xref linkend="cube-operators-table"> shows the operators provided for
<xref linkend="cube-operators-table"/> shows the operators provided for
type <type>cube</type>.
</para>
......@@ -268,7 +268,7 @@ SELECT c FROM test ORDER BY c ~&gt; 3 DESC LIMIT 5;
</para>
<para>
<xref linkend="cube-functions-table"> shows the available functions.
<xref linkend="cube-functions-table"/> shows the available functions.
</para>
<table id="cube-functions-table">
......
......@@ -123,7 +123,7 @@ Plan *(*PlanCustomPath) (PlannerInfo *root,
</programlisting>
Convert a custom path to a finished plan. The return value will generally
be a <literal>CustomScan</literal> object, which the callback must allocate and
initialize. See <xref linkend="custom-scan-plan"> for more details.
initialize. See <xref linkend="custom-scan-plan"/> for more details.
</para>
</sect2>
</sect1>
......
This diff is collapsed.
......@@ -180,7 +180,7 @@
<title>Date/Time Key Words</title>
<para>
<xref linkend="datetime-month-table"> shows the tokens that are
<xref linkend="datetime-month-table"/> shows the tokens that are
recognized as names of months.
</para>
......@@ -247,7 +247,7 @@
</table>
<para>
<xref linkend="datetime-dow-table"> shows the tokens that are
<xref linkend="datetime-dow-table"/> shows the tokens that are
recognized as names of days of the week.
</para>
......@@ -294,7 +294,7 @@
</table>
<para>
<xref linkend="datetime-mod-table"> shows the tokens that serve
<xref linkend="datetime-mod-table"/> shows the tokens that serve
various modifier purposes.
</para>
......@@ -349,7 +349,7 @@
Since timezone abbreviations are not well standardized,
<productname>PostgreSQL</productname> provides a means to customize
the set of abbreviations accepted by the server. The
<xref linkend="guc-timezone-abbreviations"> run-time parameter
<xref linkend="guc-timezone-abbreviations"/> run-time parameter
determines the active set of abbreviations. While this parameter
can be altered by any database user, the possible values for it
are under the control of the database administrator &mdash; they
......
......@@ -14,7 +14,7 @@
</para>
<para>
See also <xref linkend="postgres-fdw">, which provides roughly the same
See also <xref linkend="postgres-fdw"/>, which provides roughly the same
functionality using a more modern and standards-compliant infrastructure.
</para>
......@@ -58,8 +58,8 @@ dblink_connect(text connname, text connstr) returns text
server. It is recommended to use the foreign-data wrapper
<literal>dblink_fdw</literal> when defining the foreign
server. See the example below, as well as
<xref linkend="sql-createserver"> and
<xref linkend="sql-createusermapping">.
<xref linkend="sql-createserver"/> and
<xref linkend="sql-createusermapping"/>.
</para>
</refsect1>
......@@ -84,7 +84,7 @@ dblink_connect(text connname, text connstr) returns text
<para><application>libpq</application>-style connection info string, for example
<literal>hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres
password=mypasswd</literal>.
For details see <xref linkend="libpq-connstring">.
For details see <xref linkend="libpq-connstring"/>.
Alternatively, the name of a foreign server.
</para>
</listitem>
......@@ -1340,7 +1340,7 @@ dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, ex
the unnamed connection, or on a named connection if specified.
To receive notifications via dblink, <function>LISTEN</function> must
first be issued, using <function>dblink_exec</function>.
For details see <xref linkend="sql-listen"> and <xref linkend="sql-notify">.
For details see <xref linkend="sql-listen"/> and <xref linkend="sql-notify"/>.
</para>
</refsect1>
......
This diff is collapsed.
......@@ -226,7 +226,7 @@ gcc -G -o foo.so foo.o
</para>
<para>
Refer back to <xref linkend="xfunc-c-dynload"> about where the
Refer back to <xref linkend="xfunc-c-dynload"/> about where the
server expects to find the shared library files.
</para>
......
......@@ -71,7 +71,7 @@ mydb# select ts_lexize('intdict', '12345678');
</programlisting>
but real-world usage will involve including it in a text search
configuration as described in <xref linkend="textsearch">.
configuration as described in <xref linkend="textsearch"/>.
That might look like this:
<programlisting>
......
......@@ -135,7 +135,7 @@ mydb=# SELECT ts_lexize('xsyn', 'syn1');
</programlisting>
Real-world usage will involve including it in a text search
configuration as described in <xref linkend="textsearch">.
configuration as described in <xref linkend="textsearch"/>.
That might look like this:
<programlisting>
......
......@@ -20,18 +20,18 @@
stored. If the table has any columns with potentially-wide values,
there also might be a <acronym>TOAST</acronym> file associated with the table,
which is used to store values too wide to fit comfortably in the main
table (see <xref linkend="storage-toast">). There will be one valid index
table (see <xref linkend="storage-toast"/>). There will be one valid index
on the <acronym>TOAST</acronym> table, if present. There also might be indexes
associated with the base table. Each table and index is stored in a
separate disk file &mdash; possibly more than one file, if the file would
exceed one gigabyte. Naming conventions for these files are described
in <xref linkend="storage-file-layout">.
in <xref linkend="storage-file-layout"/>.
</para>
<para>
You can monitor disk space in three ways:
using the SQL functions listed in <xref linkend="functions-admin-dbsize">,
using the <xref linkend="oid2name"> module, or
using the SQL functions listed in <xref linkend="functions-admin-dbsize"/>,
using the <xref linkend="oid2name"/> module, or
using manual inspection of the system catalogs.
The SQL functions are the easiest to use and are generally recommended.
The remainder of this section shows how to do it by inspection of the
......@@ -124,7 +124,7 @@ ORDER BY relpages DESC;
If you cannot free up additional space on the disk by deleting
other things, you can move some of the database files to other file
systems by making use of tablespaces. See <xref
linkend="manage-ag-tablespaces"> for more information about that.
linkend="manage-ag-tablespaces"/> for more information about that.
</para>
<tip>
......
......@@ -33,10 +33,10 @@
</para>
<para>
To create a new row, use the <xref linkend="sql-insert">
To create a new row, use the <xref linkend="sql-insert"/>
command. The command requires the
table name and column values. For
example, consider the products table from <xref linkend="ddl">:
example, consider the products table from <xref linkend="ddl"/>:
<programlisting>
CREATE TABLE products (
product_no integer,
......@@ -107,16 +107,16 @@ INSERT INTO products (product_no, name, price)
WHERE release_date = 'today';
</programlisting>
This provides the full power of the SQL query mechanism (<xref
linkend="queries">) for computing the rows to be inserted.
linkend="queries"/>) for computing the rows to be inserted.
</para>
<tip>
<para>
When inserting a lot of data at the same time, considering using
the <xref linkend="sql-copy"> command.
It is not as flexible as the <xref linkend="sql-insert">
the <xref linkend="sql-copy"/> command.
It is not as flexible as the <xref linkend="sql-insert"/>
command, but is more efficient. Refer
to <xref linkend="populate"> for more information on improving
to <xref linkend="populate"/> for more information on improving
bulk loading performance.
</para>
</tip>
......@@ -141,7 +141,7 @@ INSERT INTO products (product_no, name, price)
</para>
<para>
To update existing rows, use the <xref linkend="sql-update">
To update existing rows, use the <xref linkend="sql-update"/>
command. This requires
three pieces of information:
<orderedlist spacing="compact">
......@@ -160,7 +160,7 @@ INSERT INTO products (product_no, name, price)
</para>
<para>
Recall from <xref linkend="ddl"> that SQL does not, in general,
Recall from <xref linkend="ddl"/> that SQL does not, in general,
provide a unique identifier for rows. Therefore it is not
always possible to directly specify which row to update.
Instead, you specify which conditions a row must meet in order to
......@@ -203,7 +203,7 @@ UPDATE products SET price = price * 1.10;
this does not create any ambiguity. Of course, the
<literal>WHERE</literal> condition does
not have to be an equality test. Many other operators are
available (see <xref linkend="functions">). But the expression
available (see <xref linkend="functions"/>). But the expression
needs to evaluate to a Boolean result.
</para>
......@@ -243,7 +243,7 @@ UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a &gt; 0;
</para>
<para>
You use the <xref linkend="sql-delete">
You use the <xref linkend="sql-delete"/>
command to remove rows; the syntax is very similar to the
<command>UPDATE</command> command. For instance, to remove all
rows from the products table that have a price of 10, use:
......@@ -296,7 +296,7 @@ DELETE FROM products;
<para>
The allowed contents of a <literal>RETURNING</literal> clause are the same as
a <command>SELECT</command> command's output list
(see <xref linkend="queries-select-lists">). It can contain column
(see <xref linkend="queries-select-lists"/>). It can contain column
names of the command's target table, or value expressions using those
columns. A common shorthand is <literal>RETURNING *</literal>, which selects
all columns of the target table in order.
......@@ -340,7 +340,7 @@ DELETE FROM products
</para>
<para>
If there are triggers (<xref linkend="triggers">) on the target table,
If there are triggers (<xref linkend="triggers"/>) on the target table,
the data available to <literal>RETURNING</literal> is the row as modified by
the triggers. Thus, inspecting columns computed by triggers is another
common use-case for <literal>RETURNING</literal>.
......
This diff is collapsed.
......@@ -56,7 +56,7 @@
<para>
The provided functions are shown
in <xref linkend="earthdistance-cube-functions">.
in <xref linkend="earthdistance-cube-functions"/>.
</para>
<table id="earthdistance-cube-functions">
......@@ -150,7 +150,7 @@
<para>
A single operator is provided, shown
in <xref linkend="earthdistance-point-operators">.
in <xref linkend="earthdistance-point-operators"/>.
</para>
<table id="earthdistance-point-operators">
......
This diff is collapsed.
......@@ -32,7 +32,7 @@
</para>
<para>
<xref linkend="errcodes-table"> lists all the error codes defined in
<xref linkend="errcodes-table"/> lists all the error codes defined in
<productname>PostgreSQL</productname> &version;. (Some are not actually
used at present, but are defined by the SQL standard.)
The error classes are also shown. For each error class there is a
......@@ -66,9 +66,9 @@
<title><productname>PostgreSQL</productname> Error Codes</title>
<tgroup cols="2">
<colspec colnum="1" colname="errorcode">
<colspec colnum="2" colname="condname">
<spanspec namest="errorcode" nameend="condname" spanname="span12">
<colspec colnum="1" colname="errorcode"/>
<colspec colnum="2" colname="condname"/>
<spanspec namest="errorcode" nameend="condname" spanname="span12"/>
<thead>
<row>
......
......@@ -8,7 +8,7 @@
</indexterm>
<para>
To supplement the trigger mechanism discussed in <xref linkend="triggers">,
To supplement the trigger mechanism discussed in <xref linkend="triggers"/>,
<productname>PostgreSQL</productname> also provides event triggers. Unlike regular
triggers, which are attached to a single table and capture only DML events,
event triggers are global to a particular database and are capable of
......@@ -57,7 +57,7 @@
operations that took place, use the set-returning function
<literal>pg_event_trigger_ddl_commands()</literal> from the
<literal>ddl_command_end</literal> event trigger code (see
<xref linkend="functions-event-triggers">). Note that the trigger fires
<xref linkend="functions-event-triggers"/>). Note that the trigger fires
after the actions have taken place (but before the transaction commits),
and thus the system catalogs can be read as already changed.
</para>
......@@ -68,7 +68,7 @@
database objects. To list the objects that have been dropped, use the
set-returning function <literal>pg_event_trigger_dropped_objects()</literal> from the
<literal>sql_drop</literal> event trigger code (see
<xref linkend="functions-event-triggers">). Note that
<xref linkend="functions-event-triggers"/>). Note that
the trigger is executed after the objects have been deleted from the
system catalogs, so it's not possible to look them up anymore.
</para>
......@@ -96,11 +96,11 @@
<para>
For a complete list of commands supported by the event trigger mechanism,
see <xref linkend="event-trigger-matrix">.
see <xref linkend="event-trigger-matrix"/>.
</para>
<para>
Event triggers are created using the command <xref linkend="sql-createeventtrigger">.
Event triggers are created using the command <xref linkend="sql-createeventtrigger"/>.
In order to create an event trigger, you must first create a function with
the special return type <literal>event_trigger</literal>. This function
need not (and may not) return a value; the return type serves merely as
......@@ -125,7 +125,7 @@
<title>Event Trigger Firing Matrix</title>
<para>
<xref linkend="event-trigger-by-command-tag"> lists all commands
<xref linkend="event-trigger-by-command-tag"/> lists all commands
for which event triggers are supported.
</para>
......@@ -953,7 +953,7 @@ typedef struct EventTriggerData
Describes the event for which the function is called, one of
<literal>"ddl_command_start"</literal>, <literal>"ddl_command_end"</literal>,
<literal>"sql_drop"</literal>, <literal>"table_rewrite"</literal>.
See <xref linkend="event-trigger-definition"> for the meaning of these
See <xref linkend="event-trigger-definition"/> for the meaning of these
events.
</para>
</listitem>
......@@ -1003,7 +1003,7 @@ typedef struct EventTriggerData
The event trigger definition associated the function with
the <literal>ddl_command_start</literal> event. The effect is that all DDL
commands (with the exceptions mentioned
in <xref linkend="event-trigger-definition">) are prevented from running.
in <xref linkend="event-trigger-definition"/>) are prevented from running.
</para>
<para>
......@@ -1037,7 +1037,7 @@ noddl(PG_FUNCTION_ARGS)
</para>
<para>
After you have compiled the source code (see <xref linkend="dfunc">),
After you have compiled the source code (see <xref linkend="dfunc"/>),
declare the function and the triggers:
<programlisting>
CREATE FUNCTION noddl() RETURNS event_trigger
......
This diff is collapsed.
......@@ -40,7 +40,7 @@
</itemizedlist>
All other language interfaces are external projects and are distributed
separately. <xref linkend="language-interface-table"> includes a list of
separately. <xref linkend="language-interface-table"/> includes a list of
some of these projects. Note that some of these packages might not be
released under the same license as <productname>PostgreSQL</productname>. For more
information on each language interface, including licensing terms, refer to
......@@ -170,7 +170,7 @@
<para>
In addition, there are a number of procedural languages that are developed
and maintained outside the core <productname>PostgreSQL</productname>
distribution. <xref linkend="pl-language-table"> lists some of these
distribution. <xref linkend="pl-language-table"/> lists some of these
packages. Note that some of these projects might not be released under the same
license as <productname>PostgreSQL</productname>. For more information on each
procedural language, including licensing information, refer to its website
......@@ -238,7 +238,7 @@
just like features that are built in. The
<filename>contrib/</filename> directory shipped with the source code
contains several extensions, which are described in
<xref linkend="contrib">. Other extensions are developed
<xref linkend="contrib"/>. Other extensions are developed
independently, like <application><ulink
url="http://postgis.net/">PostGIS</ulink></application>. Even
<productname>PostgreSQL</productname> replication solutions can be developed
......
This diff is collapsed.
......@@ -13,7 +13,7 @@
files in the server's file system, or to execute programs on the server
and read their output. The data file or program output must be in a format
that can be read by <command>COPY FROM</command>;
see <xref linkend="sql-copy"> for details.
see <xref linkend="sql-copy"/> for details.
Access to data files is currently read-only.
</para>
......
This diff is collapsed.
......@@ -237,7 +237,7 @@
choices made during both the initial population selection and subsequent
<quote>mutation</quote> of the best candidates. To avoid surprising changes
of the selected plan, each run of the GEQO algorithm restarts its
random number generator with the current <xref linkend="guc-geqo-seed">
random number generator with the current <xref linkend="guc-geqo-seed"/>
parameter setting. As long as <varname>geqo_seed</varname> and the other
GEQO parameters are kept fixed, the same plan will be generated for a
given query (and other planner inputs such as statistics). To experiment
......@@ -320,13 +320,13 @@
<listitem>
<para>
<xref linkend="elma04">
<xref linkend="elma04"/>
</para>
</listitem>
<listitem>
<para>
<xref linkend="fong">
<xref linkend="fong"/>
</para>
</listitem>
</itemizedlist>
......
This diff is collapsed.
......@@ -46,8 +46,8 @@
<para>
The core <productname>PostgreSQL</productname> distribution
includes the <acronym>GiST</acronym> operator classes shown in
<xref linkend="gist-builtin-opclasses-table">.
(Some of the optional modules described in <xref linkend="contrib">
<xref linkend="gist-builtin-opclasses-table"/>.
(Some of the optional modules described in <xref linkend="contrib"/>
provide additional <acronym>GiST</acronym> operator classes.)
</para>
......@@ -985,7 +985,7 @@ my_fetch(PG_FUNCTION_ARGS)
<para>
By default, a GiST index build switches to the buffering method when the
index size reaches <xref linkend="guc-effective-cache-size">. It can
index size reaches <xref linkend="guc-effective-cache-size"/>. It can
be manually turned on or off by the <literal>buffering</literal> parameter
to the CREATE INDEX command. The default behavior is good for most cases,
but turning buffering off might speed up the build somewhat if the input
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -29,8 +29,8 @@
<para>
The functions provided by the <filename>intarray</filename> module
are shown in <xref linkend="intarray-func-table">, the operators
in <xref linkend="intarray-op-table">.
are shown in <xref linkend="intarray-func-table"/>, the operators
in <xref linkend="intarray-op-table"/>.
</para>
<table id="intarray-func-table">
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment