From 01839df6ddb9a2dcb98ff8f565934a148ed57f49 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 12 May 2001 22:51:36 +0000 Subject: [PATCH] Add index. Only some parts of the manual set have index entries so far... --- doc/src/sgml/Makefile | 46 +++++---- doc/src/sgml/admin.sgml | 3 +- doc/src/sgml/array.sgml | 6 +- doc/src/sgml/client-auth.sgml | 24 ++++- doc/src/sgml/datatype.sgml | 213 +++++++++++++++++++++++++++++++++++++++- doc/src/sgml/datetime.sgml | 6 +- doc/src/sgml/filelist.sgml | 5 +- doc/src/sgml/func.sgml | 129 ++++++++++++++++++++++-- doc/src/sgml/indices.sgml | 58 ++++++++++- doc/src/sgml/install-win32.sgml | 5 + doc/src/sgml/installation.sgml | 64 +++++++++++- doc/src/sgml/keywords.sgml | 5 + doc/src/sgml/libpgtcl.sgml | 12 ++- doc/src/sgml/libpq.sgml | 35 ++++++- doc/src/sgml/mvcc.sgml | 26 ++++- doc/src/sgml/odbc.sgml | 15 ++- doc/src/sgml/plperl.sgml | 12 ++- doc/src/sgml/plsql.sgml | 14 ++- doc/src/sgml/pltcl.sgml | 18 +++- doc/src/sgml/postgres.sgml | 3 +- doc/src/sgml/programmer.sgml | 17 +--- doc/src/sgml/queries.sgml | 84 +++++++++++++++- doc/src/sgml/rules.sgml | 4 + doc/src/sgml/runtime.sgml | 81 ++++++++++++++- doc/src/sgml/stylesheet.dsl | 4 +- doc/src/sgml/syntax.sgml | 84 +++++++++++++++- doc/src/sgml/user.sgml | 6 +- doc/src/sgml/xaggr.sgml | 7 +- doc/src/sgml/xtypes.sgml | 6 ++ 29 files changed, 926 insertions(+), 66 deletions(-) diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index b3c95e6978..e60ef8156c 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.36 2001/04/20 15:52:33 thomas Exp $ +# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.37 2001/05/12 22:51:34 petere Exp $ # #---------------------------------------------------------------------------- @@ -49,16 +49,9 @@ vpath %.sgml ./ref ALLBOOKS = admin developer programmer reference tutorial user -ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) +ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) bookindex.sgml setindex.sgml - -catalog: Makefile $(top_builddir)/src/Makefile.global - (echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN\" \"$(DOCBOOKSTYLE)/html/docbook.dsl\""; \ - echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN\" \"$(DOCBOOKSTYLE)/print/docbook.dsl\"") > $@ - -ifeq "$(origin DOCBOOKSTYLE)" "command line" -.PHONY: catalog -endif +CATALOG = $(DOCBOOKSTYLE)/catalog ## @@ -84,30 +77,44 @@ man: $(ALLSGML) ## HTML ## -JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-html -t sgml +JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-html -t sgml -postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl catalog +postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl @rm -f *.html $(JADE.html) $< ln -sf $@ index.html -$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl catalog +$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl @rm -f *.html $(JADE.html) book-decl.sgml $< ln -sf $@ index.html +COLLATEINDEX = $(PERL) $(DOCBOOKSTYLE)/bin/collateindex.pl -f -g -t 'Index' + +ifeq (,$(wildcard HTML.index)) +bookindex.sgml: + $(COLLATEINDEX) -o $@ -N +setindex.sgml: + $(COLLATEINDEX) -x -o $@ -N +else +bookindex.sgml: HTML.index + $(COLLATEINDEX) -i 'bookindex' -o $@ $< +setindex.sgml: HTML.index + $(COLLATEINDEX) -i 'setindex' -x -o $@ $< +endif + ## ## Print ## # RTF to allow minor editing for hardcopy -$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl catalog - $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $< +$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl + $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $< # TeX and DVI -$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl catalog - $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $< +$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl + $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $< %.dvi: %.tex jadetex $< @@ -134,7 +141,7 @@ $(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl catalog ## Semi-automatic generation of some text files. ## -JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-text -t sgml +JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-text -t sgml INSTALL HISTORY: % : %.html @echo "|";\ @@ -171,10 +178,11 @@ check-postgres: postgres.sgml ## clean distclean maintainer-clean: - rm -f catalog # HTML rm -f HTML.manifest *.html # man rm -rf *.1 *.$(DEFAULTSECTION) man1 man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log # print rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf +# index + rm -f HTML.index bookindex.sgml setindex.sgml diff --git a/doc/src/sgml/admin.sgml b/doc/src/sgml/admin.sgml index f4ae0b182d..b79146cb99 100644 --- a/doc/src/sgml/admin.sgml +++ b/doc/src/sgml/admin.sgml @@ -1,5 +1,5 @@ @@ -38,6 +38,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.33 2001/02/04 15:28:18 diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml index df89e84d92..2fe8ea8be1 100644 --- a/doc/src/sgml/array.sgml +++ b/doc/src/sgml/array.sgml @@ -1,8 +1,12 @@ - + Arrays + + arrays + + Postgres allows columns of a table to be defined as variable-length multi-dimensional arrays. Arrays of any diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 4fe4b256aa..7ba2a36e2c 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,8 +1,12 @@ - + Client Authentication + + client authentication + + When a client application connects to the database server, it specifies which Postgres user name it wants to connect as, @@ -42,6 +46,10 @@ The <filename>pg_hba.conf</filename> file + + pg_hba.conf + + Client authentication is controlled by the file pg_hba.conf in the $PGDATA directory, e.g., @@ -333,6 +341,11 @@ host all 192.168.0.0 255.255.0.0 ident omicron Password authentication + + + password + + Postgres database passwords are separate from any operating system user passwords. Ordinarily, the password for each @@ -402,6 +415,10 @@ host all 192.168.0.0 255.255.0.0 ident omicron Kerberos authentication + + Kerberos + + Kerberos is an industry-standard secure authentication system suitable for distributed computing over a @@ -505,6 +522,10 @@ host all 192.168.0.0 255.255.0.0 ident omicron Ident-based authentication + + ident + + The Identification Protocol is described in RFC 1413. Virtually every Unix-like @@ -550,6 +571,7 @@ host all 192.168.0.0 255.255.0.0 ident omicron + pg_ident.conf Ident maps are held in the file pg_ident.conf in the data directory, which contains lines of the general form: diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 2687a4295f..93f733e50f 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,10 +1,19 @@ Data Types + + data types + + + + types + data types + + Postgres has a rich set of native data types available to users. @@ -256,6 +265,69 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.52 2001/03/24 23:03:26 pe Numeric Types + + data types + numeric + + + + integer + + + + smallint + + + + bigint + + + + int4 + integer + + + + int2 + smallint + + + + int8 + bigint + + + + numeric (data type) + + + + decimal + numeric + + + + real + + + + double precision + + + + float4 + real + + + + float8 + double precision + + + + floating point + + Numeric types consist of two-, four-, and eight-byte integers, four- and eight-byte @@ -348,6 +420,20 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.52 2001/03/24 23:03:26 pe The Serial Type + + serial + + + + auto-increment + serial + + + + sequences + and serial type + + The serial type is a special-case type constructed by Postgres from other existing components. @@ -449,6 +535,21 @@ CREATE TABLE tablename ( Character Types + + character strings + data types + + + + strings + character strings + + + + text + character strings + + SQL defines two primary character types: character and character varying. @@ -680,6 +781,12 @@ CREATE TABLE tablename ( date + + + date + data type + + The following are possible inputs for the date type. @@ -852,6 +959,11 @@ CREATE TABLE tablename ( time [ without time zone ] + + time + data type + + Per SQL99, this type can be referenced as time and as time without time zone. @@ -969,6 +1081,11 @@ CREATE TABLE tablename ( timestamp + + timestamp + data type + + Valid input for the timestamp type consists of a concatenation of a date and a time, followed by an optional AD or @@ -1024,6 +1141,10 @@ January 8 04:05:06 1999 PST interval + + interval + + intervals can be specified with the following syntax: @@ -1047,6 +1168,16 @@ January 8 04:05:06 1999 PST Special values + + time + current + + + + date + current + + The following SQL-compatible functions can be used as date or time input for the corresponding data type: CURRENT_DATE, @@ -1118,6 +1249,18 @@ January 8 04:05:06 1999 PST Date/Time Output + + date + output format + Formatting + + + + time + output format + Formatting + + Output formats can be set to one of the four styles ISO-8601, SQL (Ingres), traditional @@ -1235,6 +1378,10 @@ January 8 04:05:06 1999 PST Time Zones + + time zones + + Postgres endeavors to be compatible with SQL92 definitions for typical usage. @@ -1374,6 +1521,19 @@ January 8 04:05:06 1999 PST Boolean Type + + Boolean + data type + + + + true + + + + false + + Postgres provides the SQL99 type boolean. @@ -1536,6 +1696,10 @@ SELECT * FROM test1 WHERE a; Point + + point + + Points are the fundamental two-dimensional building block for geometric types. @@ -1575,6 +1739,10 @@ SELECT * FROM test1 WHERE a; Line Segment + + line + + Line segments (lseg) are represented by pairs of points. @@ -1607,6 +1775,10 @@ SELECT * FROM test1 WHERE a; Box + + box (data type) + + Boxes are represented by pairs of points that are opposite corners of the box. @@ -1648,6 +1820,10 @@ SELECT * FROM test1 WHERE a; Path + + path (data type) + + Paths are represented by connected sets of points. Paths can be "open", where the first and last points in the set are not connected, and "closed", @@ -1697,6 +1873,10 @@ SELECT * FROM test1 WHERE a; Polygon + + polygon + + Polygons are represented by sets of points. Polygons should probably be considered equivalent to closed paths, but are stored differently @@ -1736,6 +1916,10 @@ SELECT * FROM test1 WHERE a; Circle + + circle + + Circles are represented by a center point and a radius. @@ -1783,6 +1967,11 @@ SELECT * FROM test1 WHERE a; Network Address Data Types + + network + addresses + + Postgres offers data types to store IP and MAC addresses. It is preferable to use these types over plain text @@ -1836,6 +2025,10 @@ SELECT * FROM test1 WHERE a; <type>inet</type> + + inet (data type) + + The inet type holds an IP host address, and optionally the identity of the subnet it is in, all in one field. @@ -1862,6 +2055,10 @@ SELECT * FROM test1 WHERE a; <type>cidr</> + + cidr + + The cidr type holds an IP network specification. Input and output formats follow Classless Internet Domain Routing @@ -1973,6 +2170,15 @@ SELECT * FROM test1 WHERE a; <type>macaddr</></> + <indexterm> + <primary>macaddr (data type)</primary> + </indexterm> + + <indexterm> + <primary>MAC address</primary> + <see>macaddr</see> + </indexterm> + <para> The <type>macaddr</> type stores MAC addresses, i.e., Ethernet card hardware addresses (although MAC addresses are used for @@ -1999,6 +2205,11 @@ SELECT * FROM test1 WHERE a; <sect1 id="datatype-bit"> <title>Bit String Types + + bit strings + data type + + Bit strings are strings of 1's and 0's. They can be used to store or visualize bit masks. There are two SQL bit types: diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml index fa33fd7f4b..96db86f34d 100644 --- a/doc/src/sgml/datetime.sgml +++ b/doc/src/sgml/datetime.sgml @@ -1,5 +1,5 @@ @@ -9,6 +9,10 @@ Date/time details Time Zones + + time zones + + Postgres must have internal tabular information for time zone decoding, since there is no *nix standard diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 5881fb9183..06035e754b 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -1,4 +1,4 @@ - + @@ -7,6 +7,9 @@ + + + diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index a22d1eb8d2..4f1abbd89f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,8 +1,16 @@ - + Functions and Operators + + functions + + + + operators + + Postgres provides a large number of functions and operators for the built-in data types. Users can also @@ -28,9 +36,35 @@ Logical Operators + + operators + logical + + + + Boolean + operators + operators, logical + + The usual logical operators are available: + + and + operator + + + + or + operator + + + + not + operator + + AND OR @@ -130,6 +164,11 @@ Comparison Operators + + comparison + operators + + Comparison Operators @@ -193,6 +232,9 @@ + + between + In addition to the comparison operators, the special BETWEEN construct is available. @@ -722,7 +764,13 @@ string || string text - string concatenation + + string concatenation + + character strings + concatenation + + 'Postgre' || 'SQL' PostgreSQL @@ -730,7 +778,18 @@ char_length(string) or character_length(string) integer - length of string + + length of string + + character strings + length + + + length + character strings + character strings, length + + char_length('jose') 4 @@ -762,7 +821,12 @@ substring(string from integer for integer) text - extract substring + + extract substring + + substring + + substring('Thomas' from 2 for 3) oma @@ -997,6 +1061,10 @@ Pattern Matching with <function>LIKE</function> + + like + + string LIKE pattern ESCAPE escape-character string NOT LIKE pattern ESCAPE escape-character @@ -1081,6 +1149,11 @@ <acronym>POSIX</acronym> Regular Expressions + + regular expressions + pattern matching + +
Regular Expression Match Operators @@ -1386,6 +1459,10 @@ Formatting Functions + + formatting + + Author @@ -1749,10 +1826,9 @@ - If you want to - have a double quote in the output you must precede it with a - backslash, for example '\\"YYYY - Month\\"'. + If you want to have a double quote in the output you must + precede it with a backslash, for example '\\"YYYY + Month\\"'. @@ -2654,6 +2730,16 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); Current Date/Time + + date + current + + + + time + current + + The following functions are available to obtain the current date and/or time: @@ -3297,6 +3383,14 @@ Not defined by this name. Implements the intersection operator '#' Conditional Expressions + + case + + + + conditionals + + This section describes the SQL-compliant conditional expressions available in Postgres. @@ -3420,6 +3514,10 @@ SELECT COALESCE(description, short_description, '(none)') ... NULLIF + + nullif + + NULLIF(value1, value2) @@ -3481,6 +3579,11 @@ SELECT NULLIF(value, '(none)') ...
+ + user + current + + The session_user is the user that initiated a database connection and is fixed for the duration of that connection. The @@ -3542,6 +3645,10 @@ SELECT NULLIF(value, '(none)') ... AVG(expression) the average (arithmetic mean) of all input values + + average + function + Finding the average value is available on the following data types: smallint, integer, bigint, real, double @@ -3589,6 +3696,9 @@ SELECT NULLIF(value, '(none)') ... STDDEV(expression) the sample standard deviation of the input values + + standard deviation + Finding the standard deviation is available on the following data types: smallint, integer, bigint, real, double @@ -3616,6 +3726,9 @@ SELECT NULLIF(value, '(none)') ... VARIANCE(expression) the sample variance of the input values + + variance + The variance is the square of the standard deviation. The supported data types are the same. diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 42cab244ab..fa04c3cd91 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -1,8 +1,17 @@ - + Indices + + indices + + + + indexes + indices + + Indices are a common way to enhance database performance. An index allows the database server to find and retrieve specific rows much @@ -102,7 +111,16 @@ CREATE INDEX test1_id_index ON test1 (id); Postgres provides several index types: B-tree, R-tree, and Hash. Each index type is more appropriate for - a particular query type because of the algorithm it uses. By + a particular query type because of the algorithm it uses. + + indices + B-tree + + + B-tree + indices + + By default, the CREATE INDEX command will create a B-tree index, which fits the most common situations. In particular, the Postgres query optimizer @@ -119,6 +137,14 @@ CREATE INDEX test1_id_index ON test1 (id); + + indices + R-tree + + + R-tree + indices + R-tree indices are especially suited for spacial data. To create an R-tree index, use a command of the form @@ -142,6 +168,14 @@ CREATE INDEX name ON table + + indices + hash + + + hash + indices + The query optimizer will consider using a hash index whenever an indexed column is involved in a comparison using the = operator. The following command is used to @@ -177,6 +211,11 @@ CREATE INDEX name ON table Multi-Column Indices + + indices + multi-column + + An index can be defined on more than one column. For example, if you have a table of this form: @@ -246,6 +285,11 @@ SELECT name FROM test2 WHERE major = constant OR mino Unique Indices + + indices + unique + + Indexes may also be used to enforce uniqueness of a column's value, or the uniqueness of the combined values of more than one column. @@ -276,6 +320,11 @@ CREATE UNIQUE INDEX name ON table Functional Indices + + indices + on functions + + For a functional index, an index is defined on the result of a function applied to one or more columns of a @@ -540,6 +589,11 @@ CREATE MEMSTORE ON table COLUMNS cols Partial Indices + + indices + partial + + Author diff --git a/doc/src/sgml/install-win32.sgml b/doc/src/sgml/install-win32.sgml index 50522700aa..3282a2e21a 100644 --- a/doc/src/sgml/install-win32.sgml +++ b/doc/src/sgml/install-win32.sgml @@ -1,6 +1,11 @@ Installation on <productname>Windows</productname> + + installation + on Windows + + Build, installation, and use instructions for diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index b033f8cf79..86b1205cc7 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,9 +1,13 @@ - + <![%flattext-install-include[<productname>PostgreSQL</>]]> Installation Instructions + + installation + + Short Version @@ -42,6 +46,10 @@ su - postgres The following prerequisites exist for building PostgreSQL: + + make + + GNU make is required; other make programs will not work. @@ -71,6 +79,10 @@ su - postgres + + readline + + The GNU Readline library for comfortable line editing and command history retrieval will automatically be used @@ -83,6 +95,16 @@ su - postgres + + flex + + + bison + + + yacc + + Flex and Bison are not required when building from a released source @@ -98,6 +120,10 @@ su - postgres + + installation + on Windows + To build on Windows NT or Windows 2000 you need the Cygwin and @@ -151,6 +177,10 @@ su - postgres If You Are Upgrading + + upgrading + + The internal data storage format changes with new releases of PostgreSQL. Therefore, if you are upgrading an @@ -175,6 +205,10 @@ su - postgres + + pg_dumpall + + To dump your database installation, type: @@ -268,6 +302,11 @@ su - postgres Configuration</> + + <indexterm zone="configure"> + <primary>configure</primary> + </indexterm> + <para> The first step of the installation procedure is to configure the source tree for your system and choose the options you would like. @@ -659,6 +698,11 @@ su - postgres </varlistentry> <varlistentry> + <indexterm> + <primary>OpenSSL</primary> + <seealso>SSL</seealso> + </indexterm> + <term>--with-openssl=<replaceable>DIRECTORY</></term> <listitem> <para> @@ -776,6 +820,10 @@ All of PostgreSQL is successfully made. Ready to install. <step> <title>Regression Tests + + regression test + + If you want to test the newly built server before you install it, you can run the regression tests at this point. The regression @@ -892,6 +940,11 @@ All of PostgreSQL is successfully made. Ready to install. Shared Libraries + + + shared libraries + + On some systems that have shared libraries (which most systems do) you need to tell your system how to find the newly installed @@ -954,6 +1007,11 @@ libpq.so.2.1: cannot open shared object file: No such file or directory Environment Variables + + + PATH + + If you installed into /usr/local/pgsql or some other location that is not searched for programs by default, you need to @@ -972,6 +1030,10 @@ set path = ( /usr/local/pgsql/bin path ) + + MANPATH + man pages + To enable your system to find the man documentation, you need to add a line like the following to a shell start-up file: diff --git a/doc/src/sgml/keywords.sgml b/doc/src/sgml/keywords.sgml index 3ee3b93e39..3b1b2eab77 100644 --- a/doc/src/sgml/keywords.sgml +++ b/doc/src/sgml/keywords.sgml @@ -1,6 +1,11 @@ <acronym>SQL</acronym> Key Words + + key words + list of + + lists all tokens that are key words in the SQL standard and in PostgreSQL diff --git a/doc/src/sgml/libpgtcl.sgml b/doc/src/sgml/libpgtcl.sgml index c57766cd42..04c1b4ffa6 100644 --- a/doc/src/sgml/libpgtcl.sgml +++ b/doc/src/sgml/libpgtcl.sgml @@ -1,5 +1,13 @@ - -pgtcl - TCL Binding Library + + pgtcl - Tcl Binding Library + + + libpgtcl + + + + Tcl + pgtcl is a tcl package for front-end programs diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 23d7942887..ee971acd11 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,10 +1,14 @@ libpq - C Library + + libpq + + libpq is the C application programmer's interface to @@ -1563,6 +1567,11 @@ if any notifications came in during the processing of the query. Functions Associated with the COPY Command + + COPY + with libpq + + The COPY command in Postgres has options to read from or write to the network connection used by libpq. @@ -1839,6 +1848,10 @@ routines like PQgetvalue. Environment Variables + + environment variables + + The following environment variables can be used to select default connection parameter values, which will be used by PQconnectdb or @@ -1849,6 +1862,9 @@ application programs. + + PGHOST + PGHOST sets the default server name. If this begins with a slash, it specifies Unix-domain communication rather than TCP/IP communication; the value is the name of the @@ -1857,6 +1873,9 @@ directory in which the socket file is stored (default "/tmp"). + + PGPORT + PGPORT sets the default TCP port number or Unix-domain socket file extension for communicating with the Postgres backend. @@ -1864,18 +1883,27 @@ socket file extension for communicating with the + + PGDATABASE + PGDATABASE sets the default Postgres database name. + + PGUSER + PGUSER sets the username used to connect to the database and for authentication. + + PGPASSWORD + PGPASSWORD sets the password used if the backend demands password authentication. @@ -1957,6 +1985,11 @@ for information on correct values for these environment variables. Threading Behavior + + threads + with libpq + + libpq is thread-safe as of Postgres 7.0, so long as no two threads diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index ee7778807a..79567996d2 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -1,10 +1,14 @@ Multi-Version Concurrency Control + + concurrency + + Multi-Version Concurrency Control @@ -55,6 +59,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.13 2001/04/20 15:52:33 thomas dirty reads + dirty reads @@ -66,6 +71,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.13 2001/04/20 15:52:33 thomas non-repeatable reads + non-repeatable reads @@ -79,6 +85,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.13 2001/04/20 15:52:33 thomas phantom read + phantom reads @@ -92,6 +99,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.13 2001/04/20 15:52:33 thomas + + isolation levels + The four isolation levels and the corresponding behaviors are described below. @@ -188,6 +198,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.13 2001/04/20 15:52:33 thomas Read Committed Isolation Level + + isolation levels + read committed + + Read Committed is the default isolation level in Postgres. @@ -234,6 +249,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.13 2001/04/20 15:52:33 thomas Serializable Isolation Level + + isolation levels + read serializable + + Serializable provides the highest transaction isolation. This level emulates serial transaction execution, @@ -350,6 +370,10 @@ ERROR: Can't serialize access due to concurrent update Locking and Tables + + locking + + Postgres provides various lock modes to control concurrent diff --git a/doc/src/sgml/odbc.sgml b/doc/src/sgml/odbc.sgml index fb732c70b7..b15227f76c 100644 --- a/doc/src/sgml/odbc.sgml +++ b/doc/src/sgml/odbc.sgml @@ -1,5 +1,5 @@ @@ -19,6 +19,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.21 2001/01/20 20:59:28 ODBC Interface + + ODBC + + Background information originally by Tim Goeke @@ -80,8 +84,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.21 2001/01/20 20:59:28 (or any ODBC driver) is that there must exist a driver manager on the system where the ODBC driver is to be used. There exists a free - ODBC driver for Unix called iODBC - which can be obtained via ODBC driver for Unix called + iODBC + iODBC which can be obtained via http://www.iodbc.org. Instructions for installing iODBC are contained in the iODBC distribution. Having said that, any @@ -296,6 +301,10 @@ InstallDir = /opt/applix/axdata/axshlib ApplixWare + + ApplixWare + + ApplixWare has an ODBC database interface diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 72dd215fcf..dc4765f395 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,10 +1,18 @@ PL/Perl - Perl Procedural Language + + PL/Perl + + + + Perl + + PL/Perl allows you to write functions in the Perl programming language that may be used in SQL queries as if they were built into @@ -29,8 +37,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.7 2000/12/22 18:57:50 peter In order to build and install PL/Perl if you are installing Postgres from source then the must be supplied to the + configure configure script. PL/Perl requires that, when Perl was installed, the + libperl libperl library was build as a shared object. At the time of this writing, this is almost never the case in the Perl packages that are distributed with the operating systems. A diff --git a/doc/src/sgml/plsql.sgml b/doc/src/sgml/plsql.sgml index 4e1314c8b9..559ba4aad1 100644 --- a/doc/src/sgml/plsql.sgml +++ b/doc/src/sgml/plsql.sgml @@ -1,10 +1,14 @@ PL/pgSQL - <acronym>SQL</acronym> Procedural Language + + PL/pgSQL + + PL/pgSQL is a loadable procedural language for the Postgres database system. @@ -1690,6 +1694,14 @@ CREATE FUNCTION c_overpaid (EMP, integer) RETURNS boolean AS ' Porting from Oracle PL/SQL + + Oracle + + + + PL/SQL + + Author diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index 7d7ceb3379..4f57beb25f 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -1,10 +1,18 @@ PL/Tcl - TCL Procedural Language + + PL/Tcl + + + + Tcl + + PL/Tcl is a loadable procedural language for the Postgres database system @@ -161,6 +169,11 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS ' Trigger Procedures in PL/Tcl + + triggers + in PL/Tcl + + Trigger procedures are defined in Postgres as functions without @@ -328,6 +341,9 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab + + elog + elog level msg diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml index 22d8bec6de..a37f3e9dc8 100644 --- a/doc/src/sgml/postgres.sgml +++ b/doc/src/sgml/postgres.sgml @@ -1,5 +1,5 @@ diff --git a/doc/src/sgml/programmer.sgml b/doc/src/sgml/programmer.sgml index f4013a5213..52456c0583 100644 --- a/doc/src/sgml/programmer.sgml +++ b/doc/src/sgml/programmer.sgml @@ -1,5 +1,5 @@ @@ -63,18 +63,8 @@ PostgreSQL Programmer's Guide. &xindex; &indexcost; &gist; - - - - - - &trigger; - &spi; + &trigger; + &spi; @@ -89,6 +79,7 @@ Disable it until we put in some info. diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index 28aeccf96f..7f16eb7af9 100644 --- a/doc/src/sgml/queries.sgml +++ b/doc/src/sgml/queries.sgml @@ -1,4 +1,4 @@ - + Queries @@ -102,6 +102,10 @@ FROM table_reference , table_r Joined Tables + + joins + + A joined table is a table derived from two other (real or derived) tables according to the rules of the particular join @@ -115,6 +119,10 @@ FROM table_reference , table_r CROSS JOIN + + joins + cross + T1 CROSS JOIN T2 @@ -145,6 +153,11 @@ FROM table_reference , table_r Qualified JOINs + + joins + outer + + T1 { INNER | { LEFT | RIGHT | FULL } OUTER } JOIN T2 ON boolean_expression T1 { INNER | { LEFT | RIGHT | FULL } OUTER } JOIN T2 USING ( join column list ) @@ -187,6 +200,10 @@ FROM table_reference , table_r + + joins + natural + Finally, NATURAL is a shorthand form of USING: it forms a USING list consisting of exactly those column names that appear in both input tables. As with USING, these columns appear only once in @@ -213,6 +230,11 @@ FROM table_reference , table_r LEFT OUTER JOIN + + joins + left + + First, an INNER JOIN is performed. Then, for each row in T1 that does not satisfy the join condition with any row in @@ -268,6 +290,10 @@ FROM table_reference , table_r Subqueries + + subqueries + + Subqueries specifying a derived table must be enclosed in parentheses and must be named using an AS @@ -289,6 +315,16 @@ FROM (SELECT * FROM table1) AS alias_name Table and Column Aliases + + label + table + + + + alias + label + + A temporary name can be given to tables and complex table references to be used for references to the derived table in @@ -400,6 +436,10 @@ FROM (SELECT * FROM T1) DT1, T2, T3 WHERE clause + + where + + The syntax of the WHERE clause is @@ -482,6 +522,10 @@ FROM FDT WHERE GROUP BY and HAVING clauses + + group + + After passing the WHERE filter, the derived input table may be subject to grouping, using the GROUP BY clause, and elimination of @@ -578,6 +622,11 @@ SELECT pid AS "Products", Select Lists + + select + select list + + As shown in the previous section, the table expression in the SELECT command @@ -620,6 +669,11 @@ SELECT tbl1.a, tbl2.b, tbl1.c FROM ... Column Labels + + label + column + + The entries in the select list can be assigned names for further processing. The further processing in this case is @@ -652,6 +706,10 @@ SELECT a AS value, b + c AS sum FROM ... DISTINCT + + distinct + + After the select list has been processed, the result table may optionally be subject to the elimination of duplicates. The @@ -700,6 +758,16 @@ SELECT DISTINCT ON (expression , Combining Queries + + union + + + intersection + + + except + + The results of two queries can be combined using the set operations union, intersection, and difference. The syntax is @@ -756,6 +824,11 @@ SELECT DISTINCT ON (expression , Sorting Rows + + + sorting + query results + After a query has produced an output table (after the select list @@ -817,6 +890,15 @@ SELECT a AS b FROM table1 ORDER BY a; LIMIT and OFFSET + + limit + + + + offset + with query results + + SELECT select_list FROM table_expression ORDER BY sort_spec LIMIT { number | ALL } OFFSET number diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml index 87802323c2..6f3ac48573 100644 --- a/doc/src/sgml/rules.sgml +++ b/doc/src/sgml/rules.sgml @@ -1,6 +1,10 @@ The <ProductName>Postgres</ProductName> Rule System + + rules + + Author diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index e0f2300110..bc7a86dba1 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -13,6 +13,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.65 2001/05/08 21:09:47 mom The Postgres user account + + postgres user + + As with any other server daemon that is connected to the world at large, it is advisable to run Postgres under a separate user @@ -36,6 +40,15 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.65 2001/05/08 21:09:47 mom Creating a database cluster + + database cluster + + + + data area + database cluster + + Before you can do anything, you must initialize a database storage area on disk. We call this a database @@ -70,6 +83,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.65 2001/05/08 21:09:47 mom + + PGDATA + As an alternative to the option, you can set the environment variable PGDATA. @@ -129,6 +145,9 @@ NOTICE: Initializing database with en_US collation order. Starting the database server + + postmaster + Before anyone can access the database you must start the database server. The database server is called postmaster. @@ -157,6 +176,9 @@ NOTICE: Initializing database with en_US collation order. + + TCP/IP + The postmaster also takes a number of other command line options. For more information see the reference page and below under runtime configuration. In particular, in order for the postmaster to accept @@ -165,6 +187,9 @@ NOTICE: Initializing database with en_US collation order. + + pg_ctl + This shell syntax can get tedious quickly. Therefore the shell script wrapper pg_ctl is provided that encapsulates some of the tasks. E.g., @@ -410,6 +435,11 @@ connectDBstart() -- connect() failed: No such file or directory Run-time configuration + + configuration + server + + There are a lot of configuration parameters that affect the behavior of the database system in some way or other. Here we @@ -445,6 +475,9 @@ syslog = 2 + + SIGHUP + The configuration file is reread whenever the postmaster receives a SIGHUP signal. This signal is also propagated to all running backend processes, so that running sessions get the new default. @@ -549,6 +582,10 @@ env PGOPTIONS='-c geqo=off' psql + + index scan + + ENABLE_INDEXSCAN (boolean) @@ -585,6 +622,10 @@ env PGOPTIONS='-c geqo=off' psql + + sequential scan + + ENABLE_SEQSCAN (boolean) @@ -623,6 +664,14 @@ env PGOPTIONS='-c geqo=off' psql + + genetic query optimization + + + GEQO + genetic query optimization + + GEQO (boolean) @@ -919,6 +968,11 @@ env PGOPTIONS='-c geqo=off' psql + + deadlock + timeout + + DEADLOCK_TIMEOUT (integer) @@ -943,6 +997,10 @@ env PGOPTIONS='-c geqo=off' psql + + fsync + + FSYNC (boolean) @@ -1101,6 +1159,10 @@ env PGOPTIONS='-c geqo=off' psql + + SSL + + SSL (boolean) @@ -1431,6 +1493,14 @@ env PGOPTIONS='-c geqo=off' psql Shared Memory and Semaphores + + shared memory + + + + semaphores + + Shared memory and semaphores are collectively referred to as System V IPC (together with message queues, which are @@ -1544,6 +1614,7 @@ env PGOPTIONS='-c geqo=off' psql + SHMMAX The most important shared memory parameter is SHMMAX, the maximum size, in bytes, that a shared memory segment can have. If you get an error message from shmget along the @@ -2015,6 +2086,10 @@ default:\ Secure TCP/IP Connections with SSL + + SSL + + PostgreSQL has native support for connections over SSL to encrypt @@ -2078,6 +2153,10 @@ cp cert.cert $PGDATA/server.crt Secure TCP/IP Connections with SSH tunnels + + ssh + + Acknowledgement diff --git a/doc/src/sgml/stylesheet.dsl b/doc/src/sgml/stylesheet.dsl index 7574b57e2f..ead1cac25a 100644 --- a/doc/src/sgml/stylesheet.dsl +++ b/doc/src/sgml/stylesheet.dsl @@ -1,4 +1,4 @@ - + @@ -58,6 +58,8 @@ (define %html-header-tags% (list (list "META" '("NAME" "creation") (list "CONTENT" (time->string (time) #t))))) +(define html-index #t) + ]]> SQL Syntax + + syntax + SQL + + A description of the general syntax of SQL. @@ -70,6 +75,15 @@ INSERT INTO MY_TABLE VALUES (3, 'hi there'); Identifiers and Key Words + + identifiers + + + + key words + syntax + + Tokens such as SELECT, UPDATE, or VALUES in the example above are examples of @@ -107,6 +121,10 @@ INSERT INTO MY_TABLE VALUES (3, 'hi there'); + + case sensitivity + SQL commands + Identifier and key word names are case insensitive. Therefore UPDATE MY_TABLE SET A = 5; @@ -123,6 +141,10 @@ UPDATE my_table SET a = 5; + + quotes + and identifiers + There is a second kind of identifier: the delimited identifier or quoted identifier. It is formed by enclosing an arbitrary @@ -173,6 +195,10 @@ UPDATE "my_table" SET "a" = 5; Constants + + constants + + There are four kinds of implicitly typed constants in Postgres: @@ -186,7 +212,16 @@ UPDATE "my_table" SET "a" = 5; String Constants + + character strings + constants + + + + quotes + escaping + A string constant in SQL is an arbitrary sequence of characters bounded by single quotes ('), e.g., 'This is a string'. SQL allows single quotes to be embedded @@ -237,6 +272,11 @@ SELECT 'foo' 'bar'; Bit String Constants + + bit strings + constants + + Bit string constants look like string constants with a B (upper or lower case) immediately before the @@ -264,6 +304,11 @@ SELECT 'foo' 'bar'; Floating Point Constants + + floating point + constants + + Floating point constants are accepted in these general forms: @@ -309,6 +354,11 @@ REAL '1.23' -- string style Constants of Other Types + + data types + constants + + A constant of an arbitrary type can be entered using any one of the following notations: @@ -351,6 +401,11 @@ CAST ( 'string' AS type ) Array constants + + arrays + constants + + The general format of an array constant is the following: @@ -390,6 +445,11 @@ CAST ( 'string' AS type ) Operators + + operators + syntax + + An operator is a sequence of up to NAMEDATALEN-1 (31 by default) characters from the following list: @@ -524,6 +584,11 @@ CAST ( 'string' AS type ) Comments + + comments + in SQL + + A comment is an arbitrary sequence of characters beginning with double dashes and extending to the end of the line, e.g.: @@ -562,11 +627,19 @@ CAST ( 'string' AS type ) is either a user-defined column of a given table or one of the following system-defined columns: + + columns + system columns + + oid + + OID + The unique identifier (object ID) of a row. This is a serial number that is added by Postgres to all rows automatically. OIDs are not reused and are 32-bit quantities. @@ -841,6 +914,10 @@ sqrt(2) Aggregate Expressions + + aggregate functions + + An aggregate expression represents the application of an aggregate function across the rows selected by a @@ -896,6 +973,11 @@ sqrt(2) Lexical Precedence + + operators + precedence + + The precedence and associativity of the operators is hard-wired into the parser. Most operators have the same precedence and are diff --git a/doc/src/sgml/user.sgml b/doc/src/sgml/user.sgml index 7a4f8a3caa..f8da13ded6 100644 --- a/doc/src/sgml/user.sgml +++ b/doc/src/sgml/user.sgml @@ -1,5 +1,5 @@ @@ -34,6 +34,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.28 2001/02/04 15:28:18 &biblio; + + Extending <acronym>SQL</acronym>: Aggregates + + aggregate functions + extending + + Aggregate functions in Postgres are expressed as state values diff --git a/doc/src/sgml/xtypes.sgml b/doc/src/sgml/xtypes.sgml index 943b14f82e..65407e50a9 100644 --- a/doc/src/sgml/xtypes.sgml +++ b/doc/src/sgml/xtypes.sgml @@ -1,5 +1,11 @@ Extending <acronym>SQL</acronym>: Types + + + data types + extending + + As previously mentioned, there are two kinds of types in Postgres: base types (defined in a programming language) -- 2.11.0