Date:

Sat, 22 Jul 1995 11:53:55 -0700

Description

The createuser script has a bug where it incorrectly casts the sysuseid field to int4, thereby preventing use of large user ids.

Thanks to Sven Goldt for discovering the problem.

Fix

Apply this patch.

diff -c -r1.6 createuser.sh
*** src/bin/createuser/createuser.sh:1.6	1995/07/01 22:08:31
--- src/bin/createuser/createuser.sh	1995/07/22 18:44:46
***************
*** 137,143 ****
  		echo "$CMDNAME: the postgres ID must be a number"
  		exit 1
  	fi
! 	QUERY="select usename from pg_user where usesysid = '$SYSID'::int2"
  	RES=`$MONITOR -TN -c "$QUERY" template1`
  	if [ $? -ne 0 ]
  	then
--- 137,143 ----
  		echo "$CMDNAME: the postgres ID must be a number"
  		exit 1
  	fi
! 	QUERY="select usename from pg_user where usesysid = '$SYSID'::int4"
  	RES=`$MONITOR -TN -c "$QUERY" template1`
  	if [ $? -ne 0 ]
  	then