From 1a395b7256442023ee600f9510d007dbeb0056fa Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 2 Jan 1997 06:18:25 +0000 Subject: [PATCH] ALTER TABLE (text) fix --- src/backend/commands/command.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index 99c06b66e3..5864d45b53 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.6 1996/11/17 04:23:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.7 1997/01/02 06:18:25 momjian Exp $ * * NOTES * The PortalExecutorHeapMemory crap needs to be eliminated @@ -444,10 +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 */ + if (colDef->typename->typlen > 0) attribute->attlen = colDef->typename->typlen; + else /* bpchar, varchar, text */ + attribute->attlen = form->typlen; attribute->attnum = i; attribute->attbyval = form->typbyval; attribute->attnelems = attnelems; -- 2.40.0