Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alex Hunsaker <badalex(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
Date: 2009-01-27 04:25:09
Message-ID: 37ed240d0901262025h1d60b08asbfdedca67689d0d6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 27, 2009 at 3:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Brendan Jurd <direvus(at)gmail(dot)com> writes:
>> A quick grep through the backend code shows that strlcpy and strncpy
>> are both in use, with neither having a clear majority. I used strncpy
>> because it is more prevalent within src/backend/utils/adt.
>
> strncpy is generally deprecated; any remaining uses you find of it
> are probably only there for lack of round tuits. Use strlcpy in new
> code, unless there's a pretty strong argument that strncpy is actually
> clearer for a given usage.
>

Thanks for clearing that up Tom. I will update the patch to use
strlcpy shortly.

Cheers,
BJ

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-01-27 04:39:41 Re: 8.4 release planning
Previous Message Josh Berkus 2009-01-27 04:16:00 Re: 8.4 release planning