Fix typo and attempt default fix.

This commit is contained in:
Bruce Momjian 1999-05-21 18:31:06 +00:00
parent a7b06f20c5
commit c0d979614e
2 changed files with 10 additions and 9 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.81 1999/05/19 16:46:10 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.82 1999/05/21 18:31:04 momjian Exp $
*
*
* INTERFACE ROUTINES
@ -47,6 +47,7 @@
#include "optimizer/tlist.h"
#include "parser/parse_expr.h"
#include "parser/parse_node.h"
#include "parser/parse_target.h"
#include "parser/parse_type.h"
#include "parser/parse_coerce.h"
#include "rewrite/rewriteRemove.h"
@ -1545,11 +1546,11 @@ start:
if (atp->atttypid == BPCHAROID &&
(type == TEXTOID || type == BPCHAROID || type == UNKNOWNOID))
{
if (can_coerce_type(1, &(type), &(atp->atttypid)))
expr = coerce_type(NULL, (Node *)expr, type, atp->atttypid);
else
elog(ERROR, "DEFAULT clause const type '%s' can not be converted to char().",
typeidTypeName(type));
FuncCall *n = makeNode(FuncCall);
n->funcname = typeidTypeName(atp->atttypid);
n->args = lcons((Node *)expr, NIL);
expr = transformExpr(NULL, (Node *) n, EXPR_COLUMN_FIRST);
}
else if (IS_BINARY_COMPATIBLE(type, atp->atttypid))
; /* use without change */

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.81 1999/05/21 15:47:13 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.82 1999/05/21 18:31:06 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -5365,8 +5365,8 @@ static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr)
for (pos = 1; n->val.val.str[pos]; pos++)
{
if (n->val.val.str[pos] == '|' ||
if (n->val.val.str[pos] == '{' ||
if (n->val.val.str[pos] == '}')
n->val.val.str[pos] == '{' ||
n->val.val.str[pos] == '}')
{
found_special = true;
break;