mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Ok. Updated patch attached.
- domain.patch -> source patch against pgsql in cvs - drop_domain.sgml and create_domain.sgml -> New doc/src/sgml/ref docs - dominfo.txt -> basic domain related queries I used for testing [ ADDED TO /doc] Enables domains of array elements -> CREATE DOMAIN dom int4[3][2]; Uses a typbasetype column to describe the origin of the domain. Copies data to attnotnull rather than processing in execMain(). Some documentation differences from earlier. If this is approved, I'll start working on pg_dump, and a \dD <domain> option in psql, and regression tests. I don't really feel like doing those until the system table structure settles for pg_type. CHECKS when added, will also be copied to to the table attributes. FK Constraints (if I ever figure out how) will be done similarly. Both will lbe handled by MergeDomainAttributes() which is called shortly before MergeAttributes(). Rod Taylor
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.105 2001/11/12 20:05:24 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.106 2002/03/06 20:34:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1027,7 +1027,8 @@ parser_typecast_expression(ParseState *pstate,
|
||||
if (inputType != targetType)
|
||||
{
|
||||
expr = CoerceTargetExpr(pstate, expr, inputType,
|
||||
targetType, typename->typmod);
|
||||
getBaseType(targetType),
|
||||
typename->typmod);
|
||||
if (expr == NULL)
|
||||
elog(ERROR, "Cannot cast type '%s' to '%s'",
|
||||
format_type_be(inputType),
|
||||
@ -1039,7 +1040,7 @@ parser_typecast_expression(ParseState *pstate,
|
||||
* as well as a type coercion.
|
||||
*/
|
||||
expr = coerce_type_typmod(pstate, expr,
|
||||
targetType, typename->typmod);
|
||||
getBaseType(targetType), typename->typmod);
|
||||
|
||||
return expr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user