|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.6 1996/11/17 04:23:10 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.7 1997/01/02 06:18:25 momjian Exp $ |
11 | 11 | * |
12 | 12 | * NOTES |
13 | 13 | * The PortalExecutorHeapMemory crap needs to be eliminated |
@@ -444,10 +444,10 @@ PerformAddAttribute(char *relationName, |
444 | 444 | } |
445 | 445 | namestrcpy(&(attribute->attname), (char*)key[1].sk_argument); |
446 | 446 | attribute->atttypid=typeTuple->t_oid; |
447 | | -if (form->typlen>0) |
448 | | -attribute->attlen=form->typlen; |
449 | | -else/* bpchar and varchar */ |
| 447 | +if (colDef->typename->typlen>0) |
450 | 448 | attribute->attlen=colDef->typename->typlen; |
| 449 | +else/* bpchar, varchar, text */ |
| 450 | +attribute->attlen=form->typlen; |
451 | 451 | attribute->attnum=i; |
452 | 452 | attribute->attbyval=form->typbyval; |
453 | 453 | attribute->attnelems=attnelems; |
|