*** ./src/backend/access/hash/hashfunc.c.orig	Wed Feb 13 21:09:37 2002
--- ./src/backend/access/hash/hashfunc.c	Thu Feb 14 00:39:42 2002
***************
*** 95,101 ****
  {
  	char	   *key = NameStr(*PG_GETARG_NAME(0));
  
! 	return hash_any((char *) key, NAMEDATALEN);
  }
  
  /*
--- 95,101 ----
  {
  	char	   *key = NameStr(*PG_GETARG_NAME(0));
  
! 	return hash_any(key, strlen(key));
  }
  
  /*
***************
*** 125,131 ****
   *
   * (Comment from the original db3 hashing code: )
   *
!  * "This is INCREDIBLY ugly, but fast.  We break the string up into 8 byte
   * units.  On the first time through the loop we get the 'leftover bytes'
   * (strlen % 8).  On every later iteration, we perform 8 HASHC's so we handle
   * all 8 bytes.  Essentially, this saves us 7 cmp & branch instructions.  If
--- 125,131 ----
   *
   * (Comment from the original db3 hashing code: )
   *
!  * This is INCREDIBLY ugly, but fast.  We break the string up into 8 byte
   * units.  On the first time through the loop we get the 'leftover bytes'
   * (strlen % 8).  On every later iteration, we perform 8 HASHC's so we handle
   * all 8 bytes.  Essentially, this saves us 7 cmp & branch instructions.  If
***************
*** 134,140 ****
   * "OZ's original sdbm hash"
   */
  Datum
! hash_any(char *keydata, int keylen)
  {
  	uint32		n;
  	int			loop;
--- 134,140 ----
   * "OZ's original sdbm hash"
   */
  Datum
! hash_any(const char *keydata, int keylen)
  {
  	uint32		n;
  	int			loop;
*** ./src/include/access/hash.h.orig	Wed Feb 13 22:43:06 2002
--- ./src/include/access/hash.h	Thu Feb 14 00:38:35 2002
***************
*** 265,271 ****
  extern Datum hashint2vector(PG_FUNCTION_ARGS);
  extern Datum hashname(PG_FUNCTION_ARGS);
  extern Datum hashvarlena(PG_FUNCTION_ARGS);
! extern Datum hash_any(char *keydata, int keylen);
  
  
  /* private routines */
--- 265,271 ----
  extern Datum hashint2vector(PG_FUNCTION_ARGS);
  extern Datum hashname(PG_FUNCTION_ARGS);
  extern Datum hashvarlena(PG_FUNCTION_ARGS);
! extern Datum hash_any(const char *keydata, int keylen);
  
  
  /* private routines */
