Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6a9ed0

Browse files
committed
Hello,
I've been working on the following TODO list item: * psql \d on index with char()/varchar() fields shows improper lengthI've attached a simple patch to fix this.-Ryan
1 parent983fc97 commitf6a9ed0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/commands/indexcmds.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.1 1999/02/24 17:28:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.2 1999/03/14 05:23:12 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -502,6 +502,9 @@ NormIndexAttrs(List *attList,/* list of IndexElem's */
502502
/* we just set the type name because that is all we need */
503503
attribute->typename=makeNode(TypeName);
504504
attribute->typename->name=nameout(&((Form_pg_type)GETSTRUCT(tuple))->typname);
505+
506+
/* we all need the typmod for the char and varchar types. */
507+
attribute->typename->typmod=attform->atttypmod;
505508
}
506509

507510
if (attribute->class==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp