Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2009-01-27 03:13:55
Subject: Re: 8.4 release planning
Previous:From: Stephen FrostDate: 2009-01-27 02:25:54
Subject: Re: 8.4 release planning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group