|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.59 2003/07/01 19:10:52 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.60 2003/07/04 02:51:33 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -109,8 +109,7 @@ AggregateCreate(const char *aggName, |
109 | 109 | ObjectIdGetDatum(transfn), |
110 | 110 | 0,0,0); |
111 | 111 | if (!HeapTupleIsValid(tup)) |
112 | | -func_error("AggregateCreate",aggtransfnName, |
113 | | -nargs_transfn,fnArgs,NULL); |
| 112 | +elog(ERROR,"cache lookup of function %u failed",transfn); |
114 | 113 | proc= (Form_pg_proc)GETSTRUCT(tup); |
115 | 114 |
|
116 | 115 | /* |
@@ -264,10 +263,12 @@ lookup_agg_function(List *fnName, |
264 | 263 | &true_oid_array); |
265 | 264 |
|
266 | 265 | /* only valid case is a normal function not returning a set */ |
267 | | -if (fdresult!=FUNCDETAIL_NORMAL|| |
268 | | -!OidIsValid(fnOid)|| |
269 | | -retset) |
270 | | -func_error("AggregateCreate",fnName,nargs,input_types,NULL); |
| 266 | +if (fdresult!=FUNCDETAIL_NORMAL|| !OidIsValid(fnOid)) |
| 267 | +elog(ERROR,"function %s does not exist", |
| 268 | +func_signature_string(fnName,nargs,input_types)); |
| 269 | +if (retset) |
| 270 | +elog(ERROR,"function %s returns a set", |
| 271 | +func_signature_string(fnName,nargs,input_types)); |
271 | 272 |
|
272 | 273 | /* |
273 | 274 | * If the given type(s) are all polymorphic, there's nothing we |
@@ -295,13 +296,15 @@ lookup_agg_function(List *fnName, |
295 | 296 | if (true_oid_array[0]!=ANYARRAYOID&& |
296 | 297 | true_oid_array[0]!=ANYELEMENTOID&& |
297 | 298 | !IsBinaryCoercible(input_types[0],true_oid_array[0])) |
298 | | -func_error("AggregateCreate",fnName,nargs,input_types,NULL); |
| 299 | +elog(ERROR,"function %s requires run-time type coercion", |
| 300 | +func_signature_string(fnName,nargs,true_oid_array)); |
299 | 301 |
|
300 | 302 | if (nargs==2&& |
301 | 303 | true_oid_array[1]!=ANYARRAYOID&& |
302 | 304 | true_oid_array[1]!=ANYELEMENTOID&& |
303 | 305 | !IsBinaryCoercible(input_types[1],true_oid_array[1])) |
304 | | -func_error("AggregateCreate",fnName,nargs,input_types,NULL); |
| 306 | +elog(ERROR,"function %s requires run-time type coercion", |
| 307 | +func_signature_string(fnName,nargs,true_oid_array)); |
305 | 308 |
|
306 | 309 | returnfnOid; |
307 | 310 | } |