diff --git a/doc/src/sgml/plsql.sgml b/doc/src/sgml/plsql.sgml index fe60672257..17adde2a19 100644 --- a/doc/src/sgml/plsql.sgml +++ b/doc/src/sgml/plsql.sgml @@ -1,5 +1,5 @@ @@ -157,7 +157,7 @@ END; name [ CONSTANT ] -type> [ NOT NULL ] [ DEFAULT | := +type [ NOT NULL ] [ DEFAULT | := value ]; diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index 74f8ba18fe..5768cb368b 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -1,5 +1,5 @@ @@ -280,7 +280,7 @@ CREATE FUNCTION trigfunc_modcount() RETURNS OPAQUE AS ' return [array get NEW] ' LANGUAGE 'pltcl'; -CREATE TABLE mytab (num int4, modcnt int4, desc text); +CREATE TABLE mytab (num int4, modcnt int4, description text); CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab FOR EACH ROW EXECUTE PROCEDURE trigfunc_modcount('modcnt'); @@ -383,7 +383,7 @@ spi_exec -array C "SELECT * FROM pg_class" { will print a DEBUG log message for every row of pg_class. The return value of spi_exec is the number of rows - affected by query as found in + affected by the query as found in the global variable SPI_processed. @@ -407,7 +407,7 @@ spi_exec -array C "SELECT * FROM pg_class" { - spi_exec ?-count n? ?-arrayname? ?-nullsstring? query ?value-list? ?loop-body? + spi_exec ?-count n? ?-arrayname? ?-nullsstring? queryid ?value-list? ?loop-body? Execute a prepared plan from spi_prepare with variable substitution. diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml index 012569550a..0dcdecb95c 100644 --- a/doc/src/sgml/postgres.sgml +++ b/doc/src/sgml/postgres.sgml @@ -1,8 +1,8 @@ - @@ -112,82 +112,19 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.39 2000/07/21 00:44:13 pe ]> - + + PostgreSQL Documentation - - - PostgreSQL - - Covering v7.0 for general release - - - The PostgreSQL Development Team - - - - Thomas - Lockhart - - Caltech/JPL - - - - - - - (last updated 2000-05-01) - - - - - PostgreSQL is Copyright © 1996-2000 - by PostgreSQL Inc. - - - - - - - - - - - Summary - - - Postgres, - developed originally in the UC Berkeley Computer Science Department, - pioneered many of the object-relational concepts - now becoming available in some commercial databases. - It provides SQL92/SQL3 language support, - transaction integrity, and type extensibility. - PostgreSQL is an - open-source descendant of this original Berkeley code. - - - - + User's Guide - - - Information for users. - - + + + + + Information for Users + + + &intro; &syntax; @@ -208,15 +145,25 @@ Your name here... &plan; &populate; &commands; - - + &datetime; + + &biblio; + + + Administrator's Guide - - - Installation and maintenance information. - - + + + + + Information for Administrators + + + + - &biblio; - - + @@ -71,9 +71,9 @@ CREATE FUNCTION name ( [ The return data type. The output type may be specified as a base type, complex type, - setof type, - or opaque. - The setof + , + or . + The modifier indicates that the function will return a set of items, rather than a single item. @@ -186,28 +186,28 @@ CREATE - iscachable + iscachable - iscachable indicates that the function always + indicates that the function always returns the same result when given the same argument values (i.e., it does not do database lookups or otherwise use information not directly present in its parameter list). The optimizer uses - iscachable to know whether it is safe to + to know whether it is safe to pre-evaluate a call of the function. - isstrict + isstrict - isstrict indicates that the function always + indicates that the function always returns NULL whenever any of its arguments are NULL. If this attribute is specified, the function is not executed when there are NULL arguments; instead a NULL result is assumed automatically. - When isstrict is not specified, the function will + When is not specified, the function will be called for NULL inputs. It is then the function author's responsibility to check for NULLs if necessary and respond appropriately. diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index 84abd7c629..3fad81efdd 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -1,5 +1,5 @@ @@ -28,8 +28,6 @@ INSERT INTO table [ ( - - Inputs @@ -89,8 +87,6 @@ INSERT INTO table [ ( - - Outputs @@ -127,8 +123,6 @@ INSERT 0 # - - Description @@ -225,8 +219,6 @@ INSERT INTO tictactoe (game, board) - - SQL92 diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index 1bc1f41f6f..6a7787dfad 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -1,5 +1,5 @@ @@ -87,11 +87,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.19 2000/08/24 23:36:28 tgl E CREATE FUNCTION tp1 (int4, float8) -RETURNS int4 -AS ' UPDATE bank - SET balance = bank.balance - $2 - WHERE bank.acctountno = $1; - SELECT 1;' + RETURNS int4 + AS 'UPDATE bank + SET balance = bank.balance - $2 + WHERE bank.acctountno = $1; + SELECT 1;' LANGUAGE 'sql'; @@ -99,7 +99,7 @@ LANGUAGE 'sql'; follows: -select TP1( 17,100.0); +SELECT tp1( 17,100.0); @@ -108,10 +108,10 @@ select TP1( 17,100.0); EMP, and retrieves multiple results: -create function hobbies (EMP) returns setof HOBBIES - as 'select HOBBIES.* from HOBBIES - where $1.name = HOBBIES.person' - language 'sql'; +CREATE FUNCTION hobbies (EMP) RETURNS SET OF hobbies + AS 'SELECT hobbies.* FROM hobbies + WHERE $1.name = hobbies.person' + LANGUAGE 'sql'; @@ -125,17 +125,17 @@ create function hobbies (EMP) returns setof HOBBIES CREATE FUNCTION one() -RETURNS int4 -AS 'SELECT 1 as RESULT;' -LANGUAGE 'sql'; + RETURNS int4 + AS 'SELECT 1 as RESULT;' + LANGUAGE 'sql'; SELECT one() AS answer; - +-------+ - |answer | - +-------+ - |1 | - +-------+ ++-------+ +|answer | ++-------+ +|1 | ++-------+ @@ -152,17 +152,17 @@ SELECT one() AS answer; CREATE FUNCTION add_em(int4, int4) -RETURNS int4 -AS 'SELECT $1 + $2;' -LANGUAGE 'sql'; + RETURNS int4 + AS 'SELECT $1 + $2;' + LANGUAGE 'sql'; SELECT add_em(1, 2) AS answer; - +-------+ - |answer | - +-------+ - |3 | - +-------+ ++-------+ +|answer | ++-------+ +|3 | ++-------+ @@ -180,20 +180,20 @@ SELECT add_em(1, 2) AS answer; CREATE FUNCTION double_salary(EMP) -RETURNS int4 -AS 'SELECT $1.salary * 2 AS salary;' -LANGUAGE 'sql'; + RETURNS int4 + AS 'SELECT $1.salary * 2 AS salary;' + LANGUAGE 'sql'; SELECT name, double_salary(EMP) AS dream -FROM EMP -WHERE EMP.cubicle ~= '(2,1)'::point; - + FROM EMP + WHERE EMP.cubicle ~= '(2,1)'::point; - +-----+-------+ - |name | dream | - +-----+-------+ - |Sam | 2400 | - +-----+-------+ + ++-----+-------+ +|name | dream | ++-----+-------+ +|Sam | 2400 | ++-----+-------+ @@ -213,11 +213,11 @@ SELECT name(EMP) AS youngster FROM EMP WHERE age(EMP) < 30; - +----------+ - |youngster | - +----------+ - |Sam | - +----------+ ++----------+ +|youngster | ++----------+ +|Sam | ++----------+ @@ -230,12 +230,12 @@ SELECT name(EMP) AS youngster CREATE FUNCTION new_emp() -RETURNS EMP -AS ' SELECT \'None\'::text AS name, - 1000 AS salary, - 25 AS age, - \'(2,2)\'::point AS cubicle' -LANGUAGE 'sql'; + RETURNS EMP + AS 'SELECT \'None\'::text AS name, + 1000 AS salary, + 25 AS age, + \'(2,2)\'::point AS cubicle' + LANGUAGE 'sql'; @@ -274,11 +274,11 @@ ERROR: function declared to return emp returns varchar instead of text at colum SELECT name(new_emp()) AS nobody; - +-------+ - |nobody | - +-------+ - |None | - +-------+ ++-------+ +|nobody | ++-------+ +|None | ++-------+ @@ -310,19 +310,19 @@ NOTICE:parser: syntax error at or near "." CREATE FUNCTION clean_EMP () -RETURNS int4 -AS ' DELETE FROM EMP - WHERE EMP.salary <= 0; - SELECT 1 AS ignore_this;' -LANGUAGE 'sql'; + RETURNS int4 + AS 'DELETE FROM EMP + WHERE EMP.salary <= 0; + SELECT 1 AS ignore_this;' + LANGUAGE 'sql'; SELECT clean_EMP(); - +--+ - |x | - +--+ - |1 | - +--+ ++--+ +|x | ++--+ +|1 | ++--+