| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Neil Conway <neilc(at)samurai(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Faster StrNCpy |
| Date: | 2006-10-02 23:25:48 |
| Message-ID: | 200610022325.k92NPmF17480@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > A wholesale replacement of strncpy() calls is probably worth doing --
> > replacing them with strlcpy() if the source string is NUL-terminated,
> > and I suppose memcpy() otherwise.
>
> What I'd like to do immediately is put in strlcpy() and hit the two or
> three places I think are performance-relevant. I agree with trying to
> get rid of StrNCpy/strncpy calls over the long run, but it's just code
> beautification and probably not appropriate for beta.
Added to TODO:
* Use strlcpy() rather than our StrNCpy() macro
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sergey E. Koposov | 2006-10-02 23:26:23 | Re: src/tools/msvc usage instructions |
| Previous Message | Bruce Momjian | 2006-10-02 23:07:37 | Re: Sane error messages for SSL retry cases |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Guillaume Lelarge | 2006-10-02 23:36:50 | Small documentation patch |
| Previous Message | Bruce Momjian | 2006-10-02 22:33:35 | Re: [HACKERS] Incrementally Updated Backup |