summaryrefslogtreecommitdiff
path: root/src/include/parser
diff options
context:
space:
mode:
authorTom Lane2006-04-05 22:11:58 +0000
committerTom Lane2006-04-05 22:11:58 +0000
commit7fdb4305db20f64bce27e6bac0a0f9c972e4dec8 (patch)
tree18efa90dfcf996675cf1c7bb938d8575f7e551ad /src/include/parser
parent89a67e523e744eb168b41d192b83d17a395b4137 (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/include/parser')
-rw-r--r--src/include/parser/parse_coerce.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h
index 871c82892d5..70b7d074897 100644
--- a/src/include/parser/parse_coerce.h
+++ b/src/include/parser/parse_coerce.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/parse_coerce.h,v 1.61 2006/03/05 15:58:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/parser/parse_coerce.h,v 1.62 2006/04/05 22:11:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,7 +49,8 @@ extern bool can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids,
extern Node *coerce_type(ParseState *pstate, Node *node,
Oid inputTypeId, Oid targetTypeId, int32 targetTypeMod,
CoercionContext ccontext, CoercionForm cformat);
-extern Node *coerce_to_domain(Node *arg, Oid baseTypeId, Oid typeId,
+extern Node *coerce_to_domain(Node *arg, Oid baseTypeId, int32 baseTypeMod,
+ Oid typeId,
CoercionForm cformat, bool hideInputCoercion,
bool lengthCoercionDone);