Re: [HACKERS] patch: very simply optimalization of string_agg

2011-12-21 Thread Robert Haas
On Wed, Dec 21, 2011 at 5:12 AM, Pavel Stehule  wrote:
> This remove a not necessary string to text overhead

Committed, thanks.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] patch: very simply optimalization of string_agg

2011-12-21 Thread Pavel Stehule
Hello

This remove a not necessary string to text overhead

Regards

Pavel Stehule
*** ./src/backend/utils/adt/varlena.c.orig	2011-12-21 10:46:33.0 +0100
--- ./src/backend/utils/adt/varlena.c	2011-12-21 11:08:42.583720151 +0100
***
*** 3668,3674 
  	state = PG_ARGISNULL(0) ? NULL : (StringInfo) PG_GETARG_POINTER(0);
  
  	if (state != NULL)
! 		PG_RETURN_TEXT_P(cstring_to_text(state->data));
  	else
  		PG_RETURN_NULL();
  }
--- 3668,3674 
  	state = PG_ARGISNULL(0) ? NULL : (StringInfo) PG_GETARG_POINTER(0);
  
  	if (state != NULL)
! 		PG_RETURN_TEXT_P(cstring_to_text_with_len(state->data, state->len));
  	else
  		PG_RETURN_NULL();
  }

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers