mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
New pg_attribute.atttypmod for type-specific information like
varchar length. Cleans up code so attlen is always length. Removed varchar() hack added earlier. Will fix bug in selecting varchar() fields, and varchar() can be variable length.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.23 1998/01/05 16:38:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.24 1998/01/16 23:19:33 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The PortalExecutorHeapMemory crap needs to be eliminated
|
||||
@ -482,11 +482,8 @@ PerformAddAttribute(char *relationName,
|
||||
}
|
||||
namestrcpy(&(attribute->attname), (char *) key[1].sk_argument);
|
||||
attribute->atttypid = typeTuple->t_oid;
|
||||
if (colDef->typename->typlen > 0)
|
||||
attribute->attlen = colDef->typename->typlen;
|
||||
else
|
||||
/* bpchar, varchar, text */
|
||||
attribute->attlen = form->typlen;
|
||||
attribute->attlen = form->typlen;
|
||||
attribute->atttypmod = colDef->typename->typmod;
|
||||
attribute->attnum = i;
|
||||
attribute->attbyval = form->typbyval;
|
||||
attribute->attnelems = attnelems;
|
||||
|
Reference in New Issue
Block a user