diff options
| author | Peter Eisentraut | 2018-08-15 15:01:39 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2018-08-22 12:44:49 +0000 |
| commit | b19495772e48ecd32de9a906ddf8c25e16007575 (patch) | |
| tree | f10d7f67307f654613adcf032546b3d52c0ed75a /src/test | |
| parent | af63926cf577f4c30e43b7651e93e3a5eaa262e0 (diff) | |
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>
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/alter_generic.out | 16 | ||||
| -rw-r--r-- | src/test/regress/expected/create_operator.out | 6 | ||||
| -rw-r--r-- | src/test/regress/sql/create_operator.sql | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/test/regress/expected/alter_generic.out b/src/test/regress/expected/alter_generic.out index f24a17f40e7..6faa9d739de 100644 --- a/src/test/regress/expected/alter_generic.out +++ b/src/test/regress/expected/alter_generic.out @@ -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) , diff --git a/src/test/regress/expected/create_operator.out b/src/test/regress/expected/create_operator.out index e35eb092505..fd8b37fff56 100644 --- a/src/test/regress/expected/create_operator.out +++ b/src/test/regress/expected/create_operator.out @@ -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" ); diff --git a/src/test/regress/sql/create_operator.sql b/src/test/regress/sql/create_operator.sql index c71765f9be5..9edf32b3f80 100644 --- a/src/test/regress/sql/create_operator.sql +++ b/src/test/regress/sql/create_operator.sql @@ -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" ); |
