提交 4b130b22 编写于 作者: B Bruce Momjian

Fix for Alter TABLE add column varchar(). Was causing zero length.

上级 620f0146
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.5 1996/11/06 08:21:30 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.6 1996/11/17 04:23:10 momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
......@@ -444,7 +444,10 @@ PerformAddAttribute(char *relationName,
}
namestrcpy(&(attribute->attname), (char*) key[1].sk_argument);
attribute->atttypid = typeTuple->t_oid;
if (form->typlen > 0)
attribute->attlen = form->typlen;
else /* bpchar and varchar */
attribute->attlen = colDef->typename->typlen;
attribute->attnum = i;
attribute->attbyval = form->typbyval;
attribute->attnelems = attnelems;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册