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

From Dany DeBontridder
Subject where to write small reusable functions ?
Date
Msg-id c40e6c010704130528r23732108u28ae42a33a34195b@mail.gmail.com
Whole thread Raw
Responses Re: where to write small reusable functions ?  (Heikki Linnakangas <heikki@enterprisedb.com>)
Re: where to write small reusable functions ?  (NikhilS <nikkhils@gmail.com>)
Re: where to write small reusable functions ?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Hi,<br /><br />I'm working to implement a new feature to pg_dump: the ability to dump objects like function, indexes...
AndI notice that there some usefull functions like pg_malloc, pg_calloc... So I've added pg_free to avoid the sequence
if-not-null-free-point-to-NULL,now I'd like to add a function pg_strcat like this <br />char *<br />pg_strcat (char
*dest,char*src)<br />{<br />/* pg_realloc is a safer function than realloc */<br
/> dest=pg_realloc(dest,strlen(dest)+strlen(src)+1);<br/><br />strcat(dest,src);<br />return dest;<br />}<br /><br
/>But,in that case, those functions are only usable for pg_dump, what about the rest of code ? We don't have a central
locationfor those small reusable snippets of code ? <br /><br />Regards,<br /><br />.D.<br /> 

pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: [PATCHES] Full page writes improvement, code update
Next
From: Heikki Linnakangas
Date:
Subject: Re: where to write small reusable functions ?