1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

When implementing a coercion to a domain type with a combined

type-and-length coercion function, make sure that the coercion function
is told the correct typmod.  Fixes Kris Jurka's example of a domain
over bit(N).
This commit is contained in:
Tom Lane
2004-11-06 17:46:38 +00:00
parent a981b02336
commit f245c4eb1a
5 changed files with 40 additions and 22 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.233 2004/10/29 19:18:22 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.234 2004/11/06 17:46:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1596,7 +1596,7 @@ CopyFrom(Relation rel, List *attnumlist, bool binary, bool oids,
node = coerce_to_domain((Node *) prm,
prm->paramtype,
attr[attnum - 1]->atttypid,
COERCE_IMPLICIT_CAST, false);
COERCE_IMPLICIT_CAST, false, false);
constraintexprs[attnum - 1] = ExecPrepareExpr((Expr *) node,
estate);