<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.9 2001/09/03 12:57:49 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.10 2001/10/03 20:54:20 tgl Exp $
Postgres documentation
-->
<synopsis>
COMMENT ON
[
- [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ]
- <replaceable class="PARAMETER">object_name</replaceable> |
- COLUMN <replaceable class="PARAMETER">table_name</replaceable>.<replaceable class="PARAMETER">column_name</replaceable>|
- AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> <replaceable class="PARAMETER">agg_type</replaceable>|
- FUNCTION <replaceable class="PARAMETER">func_name</replaceable> (<replaceable class="PARAMETER">arg1</replaceable>, <replaceable class="PARAMETER">arg2</replaceable>, ...)|
+ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <replaceable class="PARAMETER">object_name</replaceable> |
+ COLUMN <replaceable class="PARAMETER">table_name</replaceable>.<replaceable class="PARAMETER">column_name</replaceable> |
+ AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> (<replaceable class="PARAMETER">agg_type</replaceable>) |
+ FUNCTION <replaceable class="PARAMETER">func_name</replaceable> (<replaceable class="PARAMETER">arg1</replaceable>, <replaceable class="PARAMETER">arg2</replaceable>, ...) |
OPERATOR <replaceable class="PARAMETER">op</replaceable> (<replaceable class="PARAMETER">leftoperand_type</replaceable> <replaceable class="PARAMETER">rightoperand_type</replaceable>) |
TRIGGER <replaceable class="PARAMETER">trigger_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable>
] IS <replaceable class="PARAMETER">'text'</replaceable>
<command>COMMENT</command> adds a comment to an object that can be
easily retrieved with <command>psql</command>'s
<command>\dd</command>, <command>\d+</command>, or <command>\l+</command> commands.
- To remove a comment, use <literal>NULL</literal>.
+ To remove a comment, write <literal>NULL</literal>.
Comments are automatically dropped when the object is dropped.
</para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.12 2001/09/03 12:57:49 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.13 2001/10/03 20:54:20 tgl Exp $
Postgres documentation
-->
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
-DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> <replaceable class="PARAMETER">type</replaceable>
+DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> )
</synopsis>
<refsect2 id="R2-SQL-DROPAGGREGATE-1">
</varlistentry>
<varlistentry>
<term><computeroutput>
-ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">agg</replaceable>' for '<replaceable class="parameter">name</replaceable>' does not exist
+ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for type <replaceable class="parameter">type</replaceable> does not exist
</computeroutput></term>
<listitem>
<para>
<literal>int4</literal>:
</para>
<programlisting>
-DROP AGGREGATE myavg int4;
+DROP AGGREGATE myavg(int4);
</programlisting>
</refsect1>
* Copyright (c) 1999-2001, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.32 2001/08/10 18:57:34 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.33 2001/10/03 20:54:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "catalog/pg_type.h"
#include "commands/comment.h"
#include "miscadmin.h"
+#include "parser/parse_agg.h"
#include "parser/parse_expr.h"
#include "parser/parse_func.h"
#include "parser/parse.h"
CommentAggregate(char *aggregate, List *arguments, char *comment)
{
TypeName *aggtype = (TypeName *) lfirst(arguments);
- char *aggtypename = NULL;
+ char *aggtypename;
Oid baseoid,
oid;
Oid classoid;
if (!pg_aggr_ownercheck(GetUserId(), aggregate, baseoid))
{
- if (aggtypename)
- elog(ERROR, "you are not permitted to comment on aggregate '%s' with type '%s'",
- aggregate, aggtypename);
- else
- elog(ERROR, "you are not permitted to comment on aggregate '%s'",
+ if (baseoid == InvalidOid)
+ elog(ERROR, "you are not permitted to comment on aggregate '%s' for all types",
aggregate);
+ else
+ elog(ERROR, "you are not permitted to comment on aggregate '%s' for type %s",
+ aggregate, format_type_be(baseoid));
}
/* Now, attempt to find the actual tuple in pg_aggregate */
ObjectIdGetDatum(baseoid),
0, 0);
if (!OidIsValid(oid))
- {
- if (aggtypename)
- elog(ERROR, "aggregate type '%s' does not exist for aggregate '%s'",
- aggtypename, aggregate);
- else
- elog(ERROR, "aggregate '%s' does not exist", aggregate);
- }
+ agg_error("CommentAggregate", aggregate, baseoid);
/* pg_aggregate doesn't have a hard-coded OID, so must look it up */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.62 2001/08/10 18:57:34 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.63 2001/10/03 20:54:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "commands/comment.h"
#include "commands/defrem.h"
#include "miscadmin.h"
+#include "parser/parse_agg.h"
#include "parser/parse_expr.h"
#include "parser/parse_func.h"
#include "utils/acl.h"
+#include "utils/builtins.h"
#include "utils/syscache.h"
{
Relation relation;
HeapTuple tup;
- Oid basetypeID = InvalidOid;
+ Oid basetypeID;
bool defined;
/*
*
* else if the basetype is blank, then attempt to find an aggregate with
* a basetype of zero. This is valid. It means that the aggregate is
- * to apply to all basetypes. ie, a counter of some sort.
- *
+ * to apply to all basetypes (eg, COUNT).
*/
if (aggType)
elog(ERROR, "RemoveAggregate: type '%s' does not exist", aggType);
}
else
- basetypeID = 0;
+ basetypeID = InvalidOid;
if (!pg_aggr_ownercheck(GetUserId(), aggName, basetypeID))
{
- if (aggType)
- {
- elog(ERROR, "RemoveAggregate: aggregate '%s' on type '%s': permission denied",
- aggName, aggType);
- }
- else
- {
- elog(ERROR, "RemoveAggregate: aggregate '%s': permission denied",
+ if (basetypeID == InvalidOid)
+ elog(ERROR, "RemoveAggregate: aggregate '%s' for all types: permission denied",
aggName);
- }
+ else
+ elog(ERROR, "RemoveAggregate: aggregate '%s' for type %s: permission denied",
+ aggName, format_type_be(basetypeID));
}
relation = heap_openr(AggregateRelationName, RowExclusiveLock);
0, 0);
if (!HeapTupleIsValid(tup))
- {
- heap_close(relation, RowExclusiveLock);
- if (aggType)
- {
- elog(ERROR, "RemoveAggregate: aggregate '%s' for '%s' does not exist",
- aggName, aggType);
- }
- else
- {
- elog(ERROR, "RemoveAggregate: aggregate '%s' for all types does not exist",
- aggName);
- }
- }
+ agg_error("RemoveAggregate", aggName, basetypeID);
/* Remove any comments related to this aggregate */
DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation));
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.199 2001/10/03 05:29:12 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.200 2001/10/03 20:54:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
foreach(ele, l)
{
- if (IsA(lfirst(ele), TypeName))
- transformTypeRef(pstate, (TypeName *) lfirst(ele));
+ Node *elem = lfirst(ele);
+
+ if (elem && IsA(elem, TypeName))
+ transformTypeRef(pstate, (TypeName *) elem);
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.257 2001/10/03 05:29:12 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.258 2001/10/03 20:54:21 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
%type <boolean> opt_freeze, analyze_keyword
%type <ival> copy_dirn, direction, reindex_type, drop_type,
- opt_column, event, comment_type, comment_cl,
- comment_ag, comment_fn, comment_op, comment_tg
+ opt_column, event, comment_type
%type <ival> fetch_how_many
* the object associated with the comment. The form of the statement is:
*
* COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ]
- * <objname> | AGGREGATE <aggname> <aggtype> | FUNCTION
+ * <objname> | AGGREGATE <aggname> (<aggtype>) | FUNCTION
* <funcname> (arg1, arg2, ...) | OPERATOR <op>
* (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON
* <relname> ] IS 'text'
n->comment = $6;
$$ = (Node *) n;
}
- | COMMENT ON comment_cl relation_name '.' attr_name IS comment_text
+ | COMMENT ON COLUMN relation_name '.' attr_name IS comment_text
{
CommentStmt *n = makeNode(CommentStmt);
- n->objtype = $3;
+ n->objtype = COLUMN;
n->objname = $4;
n->objproperty = $6;
n->objlist = NULL;
n->comment = $8;
$$ = (Node *) n;
}
- | COMMENT ON comment_ag name aggr_argtype IS comment_text
+ | COMMENT ON AGGREGATE name '(' aggr_argtype ')' IS comment_text
{
CommentStmt *n = makeNode(CommentStmt);
- n->objtype = $3;
+ n->objtype = AGGREGATE;
+ n->objname = $4;
+ n->objproperty = NULL;
+ n->objlist = makeList1($6);
+ n->comment = $9;
+ $$ = (Node *) n;
+ }
+ | COMMENT ON AGGREGATE name aggr_argtype IS comment_text
+ {
+ /* Obsolete syntax, but must support for awhile */
+ CommentStmt *n = makeNode(CommentStmt);
+ n->objtype = AGGREGATE;
n->objname = $4;
n->objproperty = NULL;
n->objlist = makeList1($5);
n->comment = $7;
$$ = (Node *) n;
}
- | COMMENT ON comment_fn func_name func_args IS comment_text
+ | COMMENT ON FUNCTION func_name func_args IS comment_text
{
CommentStmt *n = makeNode(CommentStmt);
- n->objtype = $3;
+ n->objtype = FUNCTION;
n->objname = $4;
n->objproperty = NULL;
n->objlist = $5;
n->comment = $7;
$$ = (Node *) n;
}
- | COMMENT ON comment_op all_Op '(' oper_argtypes ')' IS comment_text
+ | COMMENT ON OPERATOR all_Op '(' oper_argtypes ')' IS comment_text
{
CommentStmt *n = makeNode(CommentStmt);
- n->objtype = $3;
+ n->objtype = OPERATOR;
n->objname = $4;
n->objproperty = NULL;
n->objlist = $6;
n->comment = $9;
$$ = (Node *) n;
}
- | COMMENT ON comment_tg name ON relation_name IS comment_text
+ | COMMENT ON TRIGGER name ON relation_name IS comment_text
{
CommentStmt *n = makeNode(CommentStmt);
- n->objtype = $3;
+ n->objtype = TRIGGER;
n->objname = $4;
n->objproperty = $6;
n->objlist = NULL;
| VIEW { $$ = VIEW; }
;
-comment_cl: COLUMN { $$ = COLUMN; }
- ;
-
-comment_ag: AGGREGATE { $$ = AGGREGATE; }
- ;
-
-comment_fn: FUNCTION { $$ = FUNCTION; }
- ;
-
-comment_op: OPERATOR { $$ = OPERATOR; }
- ;
-
-comment_tg: TRIGGER { $$ = TRIGGER; }
- ;
-
comment_text: Sconst { $$ = $1; }
| NULL_P { $$ = NULL; }
;
* QUERY:
*
* DROP FUNCTION funcname (arg1, arg2, ...)
- * DROP AGGREGATE aggname aggtype
+ * DROP AGGREGATE aggname (aggtype)
* DROP OPERATOR opname (leftoperand_typ rightoperand_typ)
*
*****************************************************************************/
}
;
-RemoveAggrStmt: DROP AGGREGATE func_name aggr_argtype
+RemoveAggrStmt: DROP AGGREGATE func_name '(' aggr_argtype ')'
+ {
+ RemoveAggrStmt *n = makeNode(RemoveAggrStmt);
+ n->aggname = $3;
+ n->aggtype = (Node *) $5;
+ $$ = (Node *)n;
+ }
+ | DROP AGGREGATE func_name aggr_argtype
{
+ /* Obsolete syntax, but must support for awhile */
RemoveAggrStmt *n = makeNode(RemoveAggrStmt);
n->aggname = $3;
n->aggtype = (Node *) $4;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.57 2001/07/03 20:21:47 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.58 2001/10/03 20:54:21 tgl Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
* findTypeByOid
* given an oid of a type, return its typename
*
- * if oid is "0", return "opaque" -- this is a special case
+ * Can return various special cases for oid 0.
*
* NOTE: should hash this, but just do linear search for now
*/
if (strcmp(oid, "0") == 0)
{
-
if ((opts & zeroAsOpaque) != 0)
- {
-
return g_opaque_type;
-
- }
else if ((opts & zeroAsAny) != 0)
- {
-
return "'any'";
-
- }
+ else if ((opts & zeroAsStar) != 0)
+ return "*";
}
for (i = 0; i < numTypes; i++)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.232 2001/10/03 05:23:12 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.233 2001/10/03 20:54:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
resetPQExpBuffer(aggSig);
appendPQExpBuffer(aggSig, "%s(%s)", agginfo[i].aggname,
- findTypeByOid(tinfo, numTypes, agginfo[i].aggbasetype, zeroAsOpaque + useBaseTypeName));
+ findTypeByOid(tinfo, numTypes,
+ agginfo[i].aggbasetype,
+ zeroAsStar + useBaseTypeName));
if (!agginfo[i].convertok)
{
continue;
}
- name = findTypeByOid(tinfo, numTypes, agginfo[i].aggbasetype, zeroAsAny + useBaseTypeName);
+ name = findTypeByOid(tinfo, numTypes, agginfo[i].aggbasetype,
+ zeroAsAny + useBaseTypeName);
if (name == NULL)
{
write_msg(NULL, "WARNING: aggregate function \"%s\" (oid %s) not dumped\n",
}
appendPQExpBuffer(details, "BASETYPE = %s, ", name);
- name = findTypeByOid(tinfo, numTypes, agginfo[i].aggtranstype, zeroAsOpaque + useBaseTypeName);
+ name = findTypeByOid(tinfo, numTypes, agginfo[i].aggtranstype,
+ zeroAsOpaque + useBaseTypeName);
if (name == NULL)
{
write_msg(NULL, "WARNING: aggregate function \"%s\" (oid %s) not dumped\n",
/*** Dump Aggregate Comments ***/
resetPQExpBuffer(q);
- appendPQExpBuffer(q, "AGGREGATE %s %s", agginfo[i].aggname,
- findTypeByOid(tinfo, numTypes, agginfo[i].aggbasetype, zeroAsOpaque + useBaseTypeName));
+ appendPQExpBuffer(q, "AGGREGATE %s", aggSig->data);
dumpComment(fout, q->data, agginfo[i].oid, "pg_aggregate", 0, NULL);
}
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_dump.h,v 1.71 2001/10/01 21:31:52 tgl Exp $
+ * $Id: pg_dump.h,v 1.72 2001/10/03 20:54:21 tgl Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
{
zeroAsOpaque = 1,
zeroAsAny = 2,
+ zeroAsStar = 4,
useBaseTypeName = 1024
} OidOptions;
%type <str> createdb_opt_list opt_encoding OptInherit Geometric
%type <str> DropdbStmt ClusterStmt grantee RevokeStmt Bit bit
%type <str> GrantStmt privileges operation_commalist operation PosAllConst
-%type <str> opt_cursor ConstraintsSetStmt comment_tg AllConst
+%type <str> opt_cursor ConstraintsSetStmt AllConst
%type <str> case_expr when_clause_list case_default case_arg when_clause
%type <str> select_clause opt_select_limit select_limit_value ConstraintTimeSpec
%type <str> select_offset_value ReindexStmt join_type opt_boolean
%type <str> join_qual update_list AlterSchemaStmt joined_table
%type <str> opt_level opt_lock lock_type OptGroupList OptGroupElem
-%type <str> OptConstrFromTable comment_op OptTempTableName StringConst
-%type <str> constraints_set_list constraints_set_namelist comment_fn
-%type <str> constraints_set_mode comment_type comment_cl comment_ag
+%type <str> OptConstrFromTable OptTempTableName StringConst
+%type <str> constraints_set_list constraints_set_namelist
+%type <str> constraints_set_mode comment_type
%type <str> CreateGroupStmt AlterGroupStmt DropGroupStmt key_delete
%type <str> opt_force key_update CreateSchemaStmt PosIntStringConst
%type <str> IntConst PosIntConst grantee_list func_type opt_or_replace
* the object associated with the comment. The form of the statement is:
*
* COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ]
- * <objname> | AGGREGATE <aggname> <aggtype> | FUNCTION
+ * <objname> | AGGREGATE <aggname> (<aggtype>) | FUNCTION
* <funcname> (arg1, arg2, ...) | OPERATOR <op>
* (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON
* <relname> ] IS 'text'
{
$$ = cat_str(5, make_str("comment on"), $3, $4, make_str("is"), $6);
}
- | COMMENT ON comment_cl relation_name '.' attr_name IS comment_text
+ | COMMENT ON COLUMN relation_name '.' attr_name IS comment_text
{
- $$ = cat_str(7, make_str("comment on"), $3, $4, make_str("."), $6, make_str("is"), $8);
+ $$ = cat_str(6, make_str("comment on column"), $4, make_str("."), $6, make_str("is"), $8);
}
- | COMMENT ON comment_ag name aggr_argtype IS comment_text
+ | COMMENT ON AGGREGATE name '(' aggr_argtype ')' IS comment_text
{
- $$ = cat_str(6, make_str("comment on"), $3, $4, $5, make_str("is"), $7);
+ $$ = cat_str(6, make_str("comment on aggregate"), $4, make_str("("), $6, make_str(") is"), $9);
}
- | COMMENT ON comment_fn func_name func_args IS comment_text
+ | COMMENT ON AGGREGATE name aggr_argtype IS comment_text
+ {
+ $$ = cat_str(5, make_str("comment on aggregate"), $4, $5, make_str("is"), $7);
+ }
+ | COMMENT ON FUNCTION func_name func_args IS comment_text
{
- $$ = cat_str(6, make_str("comment on"), $3, $4, $5, make_str("is"), $7);
+ $$ = cat_str(5, make_str("comment on function"), $4, $5, make_str("is"), $7);
}
- | COMMENT ON comment_op all_Op '(' oper_argtypes ')' IS comment_text
+ | COMMENT ON OPERATOR all_Op '(' oper_argtypes ')' IS comment_text
{
- $$ = cat_str(7, make_str("comment on"), $3, $4, make_str("("), $6, make_str(") is"), $9);
+ $$ = cat_str(6, make_str("comment on operator"), $4, make_str("("), $6, make_str(") is"), $9);
}
- | COMMENT ON comment_tg name ON relation_name IS comment_text
+ | COMMENT ON TRIGGER name ON relation_name IS comment_text
{
- $$ = cat_str(7, make_str("comment on"), $3, $4, make_str("on"), $6, make_str("is"), $8);
+ $$ = cat_str(6, make_str("comment on trigger"), $4, make_str("on"), $6, make_str("is"), $8);
}
;
| VIEW { $$ = make_str("view"); }
;
-comment_cl: COLUMN { $$ = make_str("column"); }
-
-comment_ag: AGGREGATE { $$ = make_str("aggregate"); }
-
-comment_fn: FUNCTION { $$ = make_str("function"); }
-
-comment_op: OPERATOR { $$ = make_str("operator"); }
-
-comment_tg: TRIGGER { $$ = make_str("trigger"); }
-
comment_text: StringConst { $$ = $1; }
| NULL_P { $$ = make_str("null"); }
;
* QUERY:
*
* DROP FUNCTION funcname (arg1, arg2, ...)
- * DROP AGGREGATE aggname aggtype
+ * DROP AGGREGATE aggname (aggtype)
* DROP OPERATOR opname (leftoperand_typ rightoperand_typ)
*
*****************************************************************************/
}
;
-RemoveAggrStmt: DROP AGGREGATE func_name aggr_argtype
+RemoveAggrStmt: DROP AGGREGATE func_name '(' aggr_argtype ')'
+ {
+ $$ = cat_str(5, make_str("drop aggregate"), $3, make_str("("), $5, make_str(")"));
+ }
+ | DROP AGGREGATE func_name aggr_argtype
{
+ /* Obsolete syntax, but must support for awhile */
$$ = cat_str(3, make_str("drop aggregate"), $3, $4);
}
;
-- 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
--
-- 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);
--
-- 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);
--
--
-- Copyright (c) 1994, Regents of the University of California
--
--- $Id: complex.source,v 1.9 2001/08/21 16:36:06 tgl Exp $
+-- $Id: complex.source,v 1.10 2001/10/03 20:54:22 tgl Exp $
--
---------------------------------------------------------------------------
DROP OPERATOR = (complex, complex);
DROP OPERATOR >= (complex, complex);
DROP OPERATOR > (complex, complex);
-DROP AGGREGATE complex_sum complex;
+DROP AGGREGATE complex_sum (complex);
DROP TYPE complex;
DROP TABLE test_complex, complex_ops_tmp;