aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-03-14 05:23:12 +0000
committerBruce Momjian <bruce@momjian.us>1999-03-14 05:23:12 +0000
commitf6a9ed044517296374e9eec652f72fe3eddae1c7 (patch)
tree597087155ba2bb11c2e7c107aac381564b844eeb /src/backend/commands/indexcmds.c
parent983fc976726af3225325a2b13670386a05ea5ed7 (diff)
downloadpostgresql-f6a9ed044517296374e9eec652f72fe3eddae1c7.tar.gz
postgresql-f6a9ed044517296374e9eec652f72fe3eddae1c7.zip
Hello,
I've been working on the following TODO list item: * psql \d on index with char()/varchar() fields shows improper length I've attached a simple patch to fix this. -Ryan
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index e492b9163ca..6fe28daf07f 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.1 1999/02/24 17:28:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.2 1999/03/14 05:23:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -502,6 +502,9 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
/* we just set the type name because that is all we need */
attribute->typename = makeNode(TypeName);
attribute->typename->name = nameout(&((Form_pg_type) GETSTRUCT(tuple))->typname);
+
+ /* we all need the typmod for the char and varchar types. */
+ attribute->typename->typmod = attform->atttypmod;
}
if (attribute->class == NULL)