From 0b3bca6c6f92722c9c4dc8ae69703b8a5cff363f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 9 Oct 2001 04:15:38 +0000 Subject: Change plpgsql to depend on main parser's type-declaration grammar, rather than having its own somewhat half-baked notion of what a type declaration looks like. This is necessary now to ensure that plpgsql will think a 'timestamp' variable has the same semantics as 'timestamp' does in the main SQL grammar; and it should avoid divergences in future. --- doc/src/sgml/plsql.sgml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/plsql.sgml b/doc/src/sgml/plsql.sgml index a2d2395f915..d7f1b99d1b4 100644 --- a/doc/src/sgml/plsql.sgml +++ b/doc/src/sgml/plsql.sgml @@ -1,5 +1,5 @@ @@ -229,7 +229,7 @@ END; re-create them. For example: drop function testfunc(integer); -create function testfunc(integer) return integer as ' +create function testfunc(integer) returns integer as ' .... end; ' language 'plpgsql'; @@ -360,7 +360,7 @@ END; Here are some examples of variable declarations: user_id INTEGER; -quantity NUMBER(5); +quantity NUMERIC(5); url VARCHAR; @@ -437,7 +437,7 @@ END; Using the %TYPE and %ROWTYPE attributes, you can declare variables with the same - data type or structure of another database item (e.g: a + data type or structure as another database item (e.g: a table field). @@ -512,7 +512,7 @@ create function cs_refresh_one_mv(integer) returns integer as ' WHERE sort_key=key; IF NOT FOUND THEN - RAISE EXCEPTION ''View '' || key || '' not found''; + RAISE EXCEPTION ''View % not found'', key; RETURN 0; END IF; @@ -575,8 +575,7 @@ SELECT expression identifiers are substituted by parameters and the actual values from the variables are passed to the executor in the parameter array. All expressions used in a PL/pgSQL function are only prepared and - saved once. The only exception to this rule is an EXECUTE statement - if parsing of a query is needed each time it is encountered. + saved once. The only exception to this rule is an EXECUTE statement. -- cgit v1.2.3