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

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

On Mon, Jan 26, 2009 at 8:32 AM, Alex Hunsaker <badalex(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-27 03:13:55 Re: 8.4 release planning
Previous Message Stephen Frost 2009-01-27 02:25:54 Re: 8.4 release planning