From: | "Dany DeBontridder" <dany118(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | where to write small reusable functions ? |
Date: | 2007-04-13 12:28:16 |
Message-ID: | c40e6c010704130528r23732108u28ae42a33a34195b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I'm working to implement a new feature to pg_dump: the ability to dump
objects like function, indexes... And I 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
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;
}
But, in that case, those functions are only usable for pg_dump, what about
the rest of code ? We don't have a central location for those small reusable
snippets of code ?
Regards,
.D.
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2007-04-13 12:42:36 | Re: where to write small reusable functions ? |
Previous Message | Magnus Hagander | 2007-04-13 10:27:33 | Re: [pgsql-patches] O_DIRECT support for Windows |