Commit c0d97961 authored by Bruce Momjian's avatar Bruce Momjian

Fix typo and attempt default fix.

parent a7b06f20
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "optimizer/tlist.h" #include "optimizer/tlist.h"
#include "parser/parse_expr.h" #include "parser/parse_expr.h"
#include "parser/parse_node.h" #include "parser/parse_node.h"
#include "parser/parse_target.h"
#include "parser/parse_type.h" #include "parser/parse_type.h"
#include "parser/parse_coerce.h" #include "parser/parse_coerce.h"
#include "rewrite/rewriteRemove.h" #include "rewrite/rewriteRemove.h"
...@@ -1545,11 +1546,11 @@ start: ...@@ -1545,11 +1546,11 @@ start:
if (atp->atttypid == BPCHAROID && if (atp->atttypid == BPCHAROID &&
(type == TEXTOID || type == BPCHAROID || type == UNKNOWNOID)) (type == TEXTOID || type == BPCHAROID || type == UNKNOWNOID))
{ {
if (can_coerce_type(1, &(type), &(atp->atttypid))) FuncCall *n = makeNode(FuncCall);
expr = coerce_type(NULL, (Node *)expr, type, atp->atttypid);
else n->funcname = typeidTypeName(atp->atttypid);
elog(ERROR, "DEFAULT clause const type '%s' can not be converted to char().", n->args = lcons((Node *)expr, NIL);
typeidTypeName(type)); expr = transformExpr(NULL, (Node *) n, EXPR_COLUMN_FIRST);
} }
else if (IS_BINARY_COMPATIBLE(type, atp->atttypid)) else if (IS_BINARY_COMPATIBLE(type, atp->atttypid))
; /* use without change */ ; /* use without change */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * 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 * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -5365,8 +5365,8 @@ static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr) ...@@ -5365,8 +5365,8 @@ static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr)
for (pos = 1; n->val.val.str[pos]; pos++) 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] == '{' ||
if (n->val.val.str[pos] == '}') n->val.val.str[pos] == '}')
{ {
found_special = true; found_special = true;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment