where to write small reusable functions ?
От | Dany DeBontridder |
---|---|
Тема | where to write small reusable functions ? |
Дата | |
Msg-id | c40e6c010704130528r23732108u28ae42a33a34195b@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: where to write small reusable functions ?
Re: where to write small reusable functions ? Re: where to write small reusable functions ? |
Список | 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 по дате отправления: