|
10 | 10 | * |
11 | 11 | * |
12 | 12 | * IDENTIFICATION |
13 | | - * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.106 2009/01/01 17:23:38 momjian Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.107 2009/01/06 02:01:27 tgl Exp $ |
14 | 14 | * |
15 | 15 | * DESCRIPTION |
16 | 16 | * These routines take the parse tree and pick out the |
@@ -311,7 +311,15 @@ examine_parameter_list(List *parameters, Oid languageOid, |
311 | 311 | errmsg("cannot use table references in parameter default value"))); |
312 | 312 |
|
313 | 313 | /* |
| 314 | + * It can't return a set either --- but coerce_to_specific_type |
| 315 | + * already checked that for us. |
| 316 | + * |
314 | 317 | * No subplans or aggregates, either... |
| 318 | + * |
| 319 | + * Note: the point of these restrictions is to ensure that an |
| 320 | + * expression that, on its face, hasn't got subplans, aggregates, |
| 321 | + * etc cannot suddenly have them after function default arguments |
| 322 | + * are inserted. |
315 | 323 | */ |
316 | 324 | if (pstate->p_hasSubLinks) |
317 | 325 | ereport(ERROR, |
|