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

BUG #6343: PGTYPES library missing qualifiers

From: kojiro(at)hello-channel(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6343: PGTYPES library missing qualifiers
Date: 2011-12-16 15:33:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6343
Logged by:          Daniel Loffgren
Email address:      kojiro(at)hello-channel(dot)com
PostgreSQL version: 9.1.1
Operating system:   NetBSD

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.


pgsql-bugs by date

Next:From: Pavel HolecDate: 2011-12-16 16:39:46
Subject: Re: user names & non-ASCII
Previous:From: Andrea GrassiDate: 2011-12-16 14:10:47
Subject: R: BUG #6342: libpq blocks forever in "poll" function

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