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

From Brendan Jurd
Subject Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
Date
Msg-id 37ed240d0901261826l1f7733ffwf226b7462364a7f8@mail.gmail.com
Whole thread Raw
In response to Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)  (Alex Hunsaker <badalex@gmail.com>)
Responses Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
List pgsql-hackers
On Mon, Jan 26, 2009 at 8:32 AM, Alex Hunsaker <badalex@gmail.com> wrote:
>
> -the various (only moved not added)
> strncpy(...)
> copy[len]  = '\0';
>
> just use strlcpy?
>

Thanks for having a look Alex.

strlcpy would be easier, but I thought there might be portability
concerns re its non-entirely-standard status.

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.

Happy to use strlcpy if it is acceptable though.  Anybody else have an
opinion on this?

Cheers,
BJ


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: 8.4 release planning
Next
From: Bruce Momjian
Date:
Subject: Re: 8.4 release planning