summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2001-10-03 20:54:22 +0000
committerTom Lane2001-10-03 20:54:22 +0000
commit2e5fda7b7e0613b4b7c69d69b609e639deac7c17 (patch)
treecb76595ec5aa439e05891df3209e08a9b537247d /src/test
parent16def00ffb3397b8cf1344534fbfd1f3b2cfd33d (diff)
DROP AGGREGATE and COMMENT ON AGGREGATE now accept the expected syntax
'aggname (aggtype)'. The old syntax 'aggname aggtype' is still accepted for backwards compatibility. Fix pg_dump, which was actually broken for most cases of user-defined aggregates. Clean up error messages associated with these commands.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/errors.out18
-rw-r--r--src/test/regress/sql/drop.sql6
-rw-r--r--src/test/regress/sql/errors.sql16
3 files changed, 20 insertions, 20 deletions
diff --git a/src/test/regress/expected/errors.out b/src/test/regress/expected/errors.out
index b3396b5ec61..f652fb1eb05 100644
--- a/src/test/regress/expected/errors.out
+++ b/src/test/regress/expected/errors.out
@@ -129,21 +129,21 @@ ERROR: index "nonesuch" does not exist
-- missing aggregate name
drop aggregate;
ERROR: parser: parse error at or near ";"
--- bad aggregate name
-drop aggregate 314159;
-ERROR: parser: parse error at or near "314159"
--- no such aggregate
-drop aggregate nonesuch;
-ERROR: parser: parse error at or near ";"
-- missing aggregate type
drop aggregate newcnt1;
ERROR: parser: parse error at or near ";"
+-- bad aggregate name
+drop aggregate 314159 (int);
+ERROR: parser: parse error at or near "314159"
-- bad aggregate type
-drop aggregate newcnt nonesuch;
+drop aggregate newcnt (nonesuch);
ERROR: RemoveAggregate: type 'nonesuch' does not exist
+-- no such aggregate
+drop aggregate nonesuch (int4);
+ERROR: RemoveAggregate: aggregate 'nonesuch' for type integer does not exist
-- no such aggregate for type
-drop aggregate newcnt float4;
-ERROR: RemoveAggregate: aggregate 'newcnt' for 'float4' does not exist
+drop aggregate newcnt (float4);
+ERROR: RemoveAggregate: aggregate 'newcnt' for type real does not exist
--
-- REMOVE FUNCTION
diff --git a/src/test/regress/sql/drop.sql b/src/test/regress/sql/drop.sql
index fc89483208e..a466e6f7c21 100644
--- a/src/test/regress/sql/drop.sql
+++ b/src/test/regress/sql/drop.sql
@@ -73,11 +73,11 @@ DROP TYPE widget;
--
-- AGGREGATE REMOVAL
--
-DROP AGGREGATE newavg int4;
+DROP AGGREGATE newavg (int4);
-DROP AGGREGATE newsum int4;
+DROP AGGREGATE newsum (int4);
-DROP AGGREGATE newcnt int4;
+DROP AGGREGATE newcnt (int4);
--
diff --git a/src/test/regress/sql/errors.sql b/src/test/regress/sql/errors.sql
index 86c4e4fe60f..949f6405998 100644
--- a/src/test/regress/sql/errors.sql
+++ b/src/test/regress/sql/errors.sql
@@ -147,20 +147,20 @@ drop index nonesuch;
-- missing aggregate name
drop aggregate;
--- bad aggregate name
-drop aggregate 314159;
-
--- no such aggregate
-drop aggregate nonesuch;
-
-- missing aggregate type
drop aggregate newcnt1;
+-- bad aggregate name
+drop aggregate 314159 (int);
+
-- bad aggregate type
-drop aggregate newcnt nonesuch;
+drop aggregate newcnt (nonesuch);
+
+-- no such aggregate
+drop aggregate nonesuch (int4);
-- no such aggregate for type
-drop aggregate newcnt float4;
+drop aggregate newcnt (float4);
--