mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Support the syntax
CREATE AGGREGATE aggname (input_type) (parameter_list) along with the old syntax where the input type was named in the parameter list. This fits more naturally with the way that the aggregate is identified in DROP AGGREGATE and other utility commands; furthermore it has a natural extension to handle multiple-input aggregates, where the basetype-parameter method would get ugly. In fact, this commit fixes the grammar and all the utility commands to support multiple-input aggregates; but DefineAggregate rejects it because the executor isn't fixed yet. I didn't do anything about treating agg(*) as a zero-input aggregate instead of artificially making it a one-input aggregate, but that should be considered in combination with supporting multi-input aggregates.
This commit is contained in:
		@@ -7,7 +7,7 @@
 | 
			
		||||
 * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
 | 
			
		||||
 * Portions Copyright (c) 1994, Regents of the University of California
 | 
			
		||||
 *
 | 
			
		||||
 * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.184 2006/03/07 01:00:18 tgl Exp $
 | 
			
		||||
 * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.185 2006/04/15 17:45:41 tgl Exp $
 | 
			
		||||
 *
 | 
			
		||||
 *-------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
@@ -241,9 +241,7 @@ typedef enum NodeTag
 | 
			
		||||
	T_IndexStmt,
 | 
			
		||||
	T_CreateFunctionStmt,
 | 
			
		||||
	T_AlterFunctionStmt,
 | 
			
		||||
	T_RemoveAggrStmt,
 | 
			
		||||
	T_RemoveFuncStmt,
 | 
			
		||||
	T_RemoveOperStmt,
 | 
			
		||||
	T_RenameStmt,
 | 
			
		||||
	T_RuleStmt,
 | 
			
		||||
	T_NotifyStmt,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user