diff options
| author | Tom Lane | 2006-04-05 22:11:58 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-04-05 22:11:58 +0000 |
| commit | 7fdb4305db20f64bce27e6bac0a0f9c972e4dec8 (patch) | |
| tree | 18efa90dfcf996675cf1c7bb938d8575f7e551ad /src/backend/rewrite/rewriteHandler.c | |
| parent | 89a67e523e744eb168b41d192b83d17a395b4137 (diff) | |
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/rewrite/rewriteHandler.c')
| -rw-r--r-- | src/backend/rewrite/rewriteHandler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index acebefca3f0..6d1ace66f1a 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.161 2006/03/05 15:58:36 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.162 2006/04/05 22:11:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -599,7 +599,7 @@ rewriteTargetList(Query *parsetree, Relation target_relation) att_tup->attbyval); /* this is to catch a NOT NULL domain constraint */ new_expr = coerce_to_domain(new_expr, - InvalidOid, + InvalidOid, -1, att_tup->atttypid, COERCE_IMPLICIT_CAST, false, |
