Fix for constbyval .
This commit is contained in:
parent
2074b5f1ad
commit
33572dd7ed
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.34 1998/09/01 04:27:49 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.35 1998/10/01 22:45:29 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -332,8 +332,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||||
|
|
||||||
for (i = 0; i < constr->num_check; i++)
|
for (i = 0; i < constr->num_check; i++)
|
||||||
{
|
{
|
||||||
Constraint *cdef = (Constraint *) makeNode(Constraint); /* palloc(sizeof(Constrai
|
Constraint *cdef = (Constraint *) makeNode(Constraint);
|
||||||
* nt)); */
|
|
||||||
|
|
||||||
cdef->contype = CONSTR_CHECK;
|
cdef->contype = CONSTR_CHECK;
|
||||||
if (check[i].ccname[0] == '$')
|
if (check[i].ccname[0] == '$')
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.6 1998/09/01 04:30:28 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.7 1998/10/01 22:45:30 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -99,8 +99,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
|
||||||
{
|
{
|
||||||
Const *con = (Const *) node;
|
Const *con = (Const *) node;
|
||||||
|
|
||||||
val = (Datum) textout((struct varlena *)
|
val = (Datum) textout((struct varlena *)con->constvalue);
|
||||||
con->constvalue);
|
|
||||||
infunc = typeidInfunc(targetTypeId);
|
infunc = typeidInfunc(targetTypeId);
|
||||||
con = makeNode(Const);
|
con = makeNode(Const);
|
||||||
con->consttype = targetTypeId;
|
con->consttype = targetTypeId;
|
||||||
|
@ -112,7 +111,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
|
||||||
typeidTypElem(targetTypeId),
|
typeidTypElem(targetTypeId),
|
||||||
-1);
|
-1);
|
||||||
con->constisnull = false;
|
con->constisnull = false;
|
||||||
con->constbyval = true;
|
con->constbyval = typeByVal(typeidType(targetTypeId));
|
||||||
con->constisset = false;
|
con->constisset = false;
|
||||||
result = (Node *) con;
|
result = (Node *) con;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.22 1998/09/25 13:36:05 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.23 1998/10/01 22:45:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -79,7 +79,6 @@ make_operand(char *opname,
|
||||||
result = coerce_type(NULL, tree, orig_typeId, true_typeId);
|
result = coerce_type(NULL, tree, orig_typeId, true_typeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* otherwise, this is a NULL value */
|
/* otherwise, this is a NULL value */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue