mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
doc: Update uses of the word "procedure"
Historically, the term procedure was used as a synonym for function in Postgres/PostgreSQL. Now we have procedures as separate objects from functions, so we need to clean up the documentation to not mix those terms. In particular, mentions of "trigger procedures" are changed to "trigger functions", and access method "support procedures" are changed to "support functions". (The latter already used FUNCTION in the SQL syntax anyway.) Also, the terminology in the SPI chapter has been cleaned up. A few tests, examples, and code comments are also adjusted to be consistent with documentation changes, but not everything. Reported-by: Peter Geoghegan <pg@bowt.ie> Reviewed-by: Jonathan S. Katz <jonathan.katz@excoventures.com>
This commit is contained in:
@ -354,9 +354,9 @@ ERROR: invalid operator number 0, must be between 1 and 5
|
||||
ALTER OPERATOR FAMILY alt_opf4 USING btree ADD OPERATOR 1 < ; -- operator without argument types
|
||||
ERROR: operator argument types must be specified in ALTER OPERATOR FAMILY
|
||||
ALTER OPERATOR FAMILY alt_opf4 USING btree ADD FUNCTION 0 btint42cmp(int4, int2); -- function number should be between 1 and 5
|
||||
ERROR: invalid procedure number 0, must be between 1 and 3
|
||||
ERROR: invalid function number 0, must be between 1 and 3
|
||||
ALTER OPERATOR FAMILY alt_opf4 USING btree ADD FUNCTION 6 btint42cmp(int4, int2); -- function number should be between 1 and 5
|
||||
ERROR: invalid procedure number 6, must be between 1 and 3
|
||||
ERROR: invalid function number 6, must be between 1 and 3
|
||||
ALTER OPERATOR FAMILY alt_opf4 USING btree ADD STORAGE invalid_storage; -- Ensure STORAGE is not a part of ALTER OPERATOR FAMILY
|
||||
ERROR: STORAGE cannot be specified in ALTER OPERATOR FAMILY
|
||||
DROP OPERATOR FAMILY alt_opf4 USING btree;
|
||||
@ -412,7 +412,7 @@ BEGIN TRANSACTION;
|
||||
CREATE OPERATOR FAMILY alt_opf12 USING btree;
|
||||
CREATE FUNCTION fn_opf12 (int4, int2) RETURNS BIGINT AS 'SELECT NULL::BIGINT;' LANGUAGE SQL;
|
||||
ALTER OPERATOR FAMILY alt_opf12 USING btree ADD FUNCTION 1 fn_opf12(int4, int2);
|
||||
ERROR: btree comparison procedures must return integer
|
||||
ERROR: btree comparison functions must return integer
|
||||
DROP OPERATOR FAMILY alt_opf12 USING btree;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||
ROLLBACK;
|
||||
@ -421,7 +421,7 @@ BEGIN TRANSACTION;
|
||||
CREATE OPERATOR FAMILY alt_opf13 USING hash;
|
||||
CREATE FUNCTION fn_opf13 (int4) RETURNS BIGINT AS 'SELECT NULL::BIGINT;' LANGUAGE SQL;
|
||||
ALTER OPERATOR FAMILY alt_opf13 USING hash ADD FUNCTION 1 fn_opf13(int4);
|
||||
ERROR: hash procedure 1 must return integer
|
||||
ERROR: hash function 1 must return integer
|
||||
DROP OPERATOR FAMILY alt_opf13 USING hash;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||
ROLLBACK;
|
||||
@ -430,7 +430,7 @@ BEGIN TRANSACTION;
|
||||
CREATE OPERATOR FAMILY alt_opf14 USING btree;
|
||||
CREATE FUNCTION fn_opf14 (int4) RETURNS BIGINT AS 'SELECT NULL::BIGINT;' LANGUAGE SQL;
|
||||
ALTER OPERATOR FAMILY alt_opf14 USING btree ADD FUNCTION 1 fn_opf14(int4);
|
||||
ERROR: btree comparison procedures must have two arguments
|
||||
ERROR: btree comparison functions must have two arguments
|
||||
DROP OPERATOR FAMILY alt_opf14 USING btree;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||
ROLLBACK;
|
||||
@ -439,7 +439,7 @@ BEGIN TRANSACTION;
|
||||
CREATE OPERATOR FAMILY alt_opf15 USING hash;
|
||||
CREATE FUNCTION fn_opf15 (int4, int2) RETURNS BIGINT AS 'SELECT NULL::BIGINT;' LANGUAGE SQL;
|
||||
ALTER OPERATOR FAMILY alt_opf15 USING hash ADD FUNCTION 1 fn_opf15(int4, int2);
|
||||
ERROR: hash procedure 1 must have one argument
|
||||
ERROR: hash function 1 must have one argument
|
||||
DROP OPERATOR FAMILY alt_opf15 USING hash;
|
||||
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||
ROLLBACK;
|
||||
@ -447,7 +447,7 @@ ROLLBACK;
|
||||
-- without defining left / right type in ALTER OPERATOR FAMILY ... ADD FUNCTION
|
||||
CREATE OPERATOR FAMILY alt_opf16 USING gist;
|
||||
ALTER OPERATOR FAMILY alt_opf16 USING gist ADD FUNCTION 1 btint42cmp(int4, int2);
|
||||
ERROR: associated data types must be specified for index support procedure
|
||||
ERROR: associated data types must be specified for index support function
|
||||
DROP OPERATOR FAMILY alt_opf16 USING gist;
|
||||
-- Should fail. duplicate operator number / function number in ALTER OPERATOR FAMILY ... ADD FUNCTION
|
||||
CREATE OPERATOR FAMILY alt_opf17 USING btree;
|
||||
@ -464,7 +464,7 @@ ALTER OPERATOR FAMILY alt_opf17 USING btree ADD
|
||||
OPERATOR 5 > (int4, int2) ,
|
||||
FUNCTION 1 btint42cmp(int4, int2) ,
|
||||
FUNCTION 1 btint42cmp(int4, int2); -- procedure 1 appears twice in same statement
|
||||
ERROR: procedure number 1 for (integer,smallint) appears more than once
|
||||
ERROR: function number 1 for (integer,smallint) appears more than once
|
||||
ALTER OPERATOR FAMILY alt_opf17 USING btree ADD
|
||||
OPERATOR 1 < (int4, int2) ,
|
||||
OPERATOR 2 <= (int4, int2) ,
|
||||
|
@ -185,11 +185,11 @@ CREATE OPERATOR ===
|
||||
(
|
||||
"Leftarg" = box,
|
||||
"Rightarg" = box,
|
||||
"Procedure" = area_equal_procedure,
|
||||
"Procedure" = area_equal_function,
|
||||
"Commutator" = ===,
|
||||
"Negator" = !==,
|
||||
"Restrict" = area_restriction_procedure,
|
||||
"Join" = area_join_procedure,
|
||||
"Restrict" = area_restriction_function,
|
||||
"Join" = area_join_function,
|
||||
"Hashes",
|
||||
"Merges"
|
||||
);
|
||||
|
@ -189,11 +189,11 @@ CREATE OPERATOR ===
|
||||
(
|
||||
"Leftarg" = box,
|
||||
"Rightarg" = box,
|
||||
"Procedure" = area_equal_procedure,
|
||||
"Procedure" = area_equal_function,
|
||||
"Commutator" = ===,
|
||||
"Negator" = !==,
|
||||
"Restrict" = area_restriction_procedure,
|
||||
"Join" = area_join_procedure,
|
||||
"Restrict" = area_restriction_function,
|
||||
"Join" = area_join_function,
|
||||
"Hashes",
|
||||
"Merges"
|
||||
);
|
||||
|
Reference in New Issue
Block a user