diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-04-05 22:11:58 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-04-05 22:11:58 +0000 |
| commit | 7fdb4305db20f64bce27e6bac0a0f9c972e4dec8 (patch) | |
| tree | 18efa90dfcf996675cf1c7bb938d8575f7e551ad /src/backend/optimizer/prep/preptlist.c | |
| parent | 89a67e523e744eb168b41d192b83d17a395b4137 (diff) | |
| download | postgresql-7fdb4305db20f64bce27e6bac0a0f9c972e4dec8.tar.gz | |
Fix a bunch of problems with domains by making them use special input functions
that apply the necessary domain constraint checks immediately. This fixes
cases where domain constraints went unchecked for statement parameters,
PL function local variables and results, etc. We can also eliminate existing
special cases for domains in places that had gotten it right, eg COPY.
Also, allow domains over domains (base of a domain is another domain type).
This almost worked before, but was disallowed because the original patch
hadn't gotten it quite right.
Diffstat (limited to 'src/backend/optimizer/prep/preptlist.c')
| -rw-r--r-- | src/backend/optimizer/prep/preptlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 436d6fdce0..5a37b86eb5 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/prep/preptlist.c,v 1.80 2006/03/05 15:58:31 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/prep/preptlist.c,v 1.81 2006/04/05 22:11:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -249,7 +249,7 @@ expand_targetlist(List *tlist, int command_type, true, /* isnull */ att_tup->attbyval); new_expr = coerce_to_domain(new_expr, - InvalidOid, + InvalidOid, -1, atttype, COERCE_IMPLICIT_CAST, false, |
