From: kojiro@hello-channel.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6343: PGTYPES library missing qualifiers
Date: Fri, 16 Dec 2011 15:33:18 +0000
Message-ID: <E1RbZmg-0007KG-4v@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 6343
Logged by: Daniel Loffgren
Email address: kojiro@hello-channel.com
PostgreSQL version: 9.1.1
Operating system: NetBSD
Description:
In the ecpg PGTYPES library, there are functions like this:
extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);
The last argument is the formatting string, yet isn't constant. This
generates warnings/errors on many compilers that are watching for discarding
of qualifiers when passing in string literals. It's a simple fix, although I
noticed that in PGTYPEStimestamp_defmt_asc the code is altering the
formatter if it is null, which prevents making the formatter const. However,
dttofmtasc_replace does not alter the formatter, and so should not pose a
problem for PGTYPEStimestamp_fmt_asc which passes straight to it.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: kojiro@hello-channel.com
Subject: Re: BUG #6343: PGTYPES library missing qualifiers
In-Reply-To: <E1RbZmg-0007KG-4v@wrigleys.postgresql.org>
References: <E1RbZmg-0007KG-4v@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox