Re: where to write small reusable functions ?

From: NikhilS <nikkhils(at)gmail(dot)com>
To: "Dany DeBontridder" <dany118(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: where to write small reusable functions ?
Date: 2007-04-13 12:51:12
Message-ID: d3c4af540704130551u422de996o7a7e51eddc179e24@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-04-13 12:55:55 Re: where to write small reusable functions ?
Previous Message Heikki Linnakangas 2007-04-13 12:42:36 Re: where to write small reusable functions ?