Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f910a3

Browse files
committed
Add some comments about why function parameter default expressions are
restricted.
1 parent10374a3 commit9f910a3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/backend/commands/functioncmds.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* 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 $
1414
*
1515
* DESCRIPTION
1616
* These routines take the parse tree and pick out the
@@ -311,7 +311,15 @@ examine_parameter_list(List *parameters, Oid languageOid,
311311
errmsg("cannot use table references in parameter default value")));
312312

313313
/*
314+
* It can't return a set either --- but coerce_to_specific_type
315+
* already checked that for us.
316+
*
314317
* 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.
315323
*/
316324
if (pstate->p_hasSubLinks)
317325
ereport(ERROR,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp