Re: where to write small reusable functions ? - Mailing list pgsql-hackers

From NikhilS
Subject Re: where to write small reusable functions ?
Date
Msg-id d3c4af540704130551u422de996o7a7e51eddc179e24@mail.gmail.com
Whole thread Raw
In response to where to write small reusable functions ?  ("Dany DeBontridder" <dany118@gmail.com>)
List pgsql-hackers
Hi,

char *
pg_strcat (char *dest,char *src)
{
/* pg_realloc is a safer function than realloc */
 dest=pg_realloc(dest,strlen(dest)+strlen(src)+1);

strcat(dest,src);
return dest;
}

Postgres already has something for the above functionality.

See makeStringInfo, appendStringInfo.

Regards,
Nikhils
--
EnterpriseDB               http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: where to write small reusable functions ?
Next
From: Peter Eisentraut
Date:
Subject: Re: where to write small reusable functions ?