Commit Graph

11 Commits

Author SHA1 Message Date
Peter Eisentraut 38d8dce61f Remove some code for old unsupported versions of MSVC
As of d9dd406fe2, we require MSVC 2013,
which means _MSC_VER >= 1800.  This means that conditionals about
older versions of _MSC_VER can be removed or simplified.

Previous code was also in some cases handling MinGW, where _MSC_VER is
not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h,
leading to some compiler warnings.  This should now be handled better.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
2019-10-08 10:50:54 +02:00
Tom Lane c5658a0764 Suppress compiler warnings in ecpg test on newer Windows toolchains.
nan_test.pgc supposed that it could unconditionally #define isnan()
and isinf() on WIN32.  This was evidently copied at some point from
src/include/port/win32.h, but nowadays there's a test on _MSC_VER
there.  Make nan_test.pgc look the same.

Per buildfarm warnings.  There's no evidence this produces anything
worse than a warning, and besides it's only a test case, so I don't
feel a need to back-patch.
2017-02-24 16:45:32 -05:00
Tom Lane 18555b1323 Establish conventions about global object names used in regression tests.
To ensure that "make installcheck" can be used safely against an existing
installation, we need to be careful about what global object names
(database, role, and tablespace names) we use; otherwise we might
accidentally clobber important objects.  There's been a weak consensus that
test databases should have names including "regression", and that test role
names should start with "regress_", but we didn't have any particular rule
about tablespace names; and neither of the other rules was followed with
any consistency either.

This commit moves us a long way towards having a hard-and-fast rule that
regression test databases must have names including "regression", and that
test role and tablespace names must start with "regress_".  It's not
completely there because I did not touch some test cases in rolenames.sql
that test creation of special role names like "session_user".  That will
require some rethinking of exactly what we want to test, whereas the intent
of this patch is just to hit all the cases in which the needed renamings
are cosmetic.

There is no enforcement mechanism in this patch either, but if we don't
add one we can expect that the tests will soon be violating the convention
again.  Again, that's not such a cosmetic change and it will require
discussion.  (But I did use a quick-hack enforcement patch to find these
cases.)

Discussion: <16638.1468620817@sss.pgh.pa.us>
2016-07-17 18:42:43 -04:00
Alvaro Herrera 61bee9f756 Split ecpg_execute() in constituent parts
Split the rather long ecpg_execute() function into ecpg_build_params(),
ecpg_autostart_transaction(), a smaller ecpg_execute() and
ecpg_process_output().  There is no user-visible change here, only code
reorganization to support future patches.

Author: Zoltán Böszörményi

Reviewed by Antonin Houska.  Larger, older versions of this patch were
reviewed by Noah Misch and Michael Meskes.
2014-01-16 18:06:50 -03:00
Alvaro Herrera 3291301385 Split ECPGdo() in constituent parts
This splits ECPGdo() into ecpg_prologue(), ecpg_do() and
ecpg_epilogue(), and renames free_params() into ecpg_free_params() and
exports it.  This makes it possible for future code to use these
routines for their own purposes.

There is no user-visible functionality change here, only code
reorganization.

Zoltán Böszörményi

Reviewed by Antonin Houska.  Larger, older versions of this patch were
reviewed by Noah Misch and Michael Meskes.
2014-01-16 16:36:41 -03:00
Michael Meskes 9a8d15bd41 Applied Zoltan's patch to fix a few memleaks in ecpg's pgtypeslib. 2010-08-17 09:36:05 +00:00
Michael Meskes c34446cddd First try to make this one ecpg regression test work on Windows too. I'm just trying to figure out the minimal amount of defines needed. 2010-02-09 08:57:13 +00:00
Michael Meskes 58fb345dde Usage of isnan() in ECPG regression tests probably needs '#include <float.h>' as well. 2010-02-04 11:23:29 +00:00
Michael Meskes a96ad2fc74 Streamlined array handling code in libecpg a little bit, in the process fixing yet another incorrect log output. 2010-02-04 09:41:35 +00:00
Michael Meskes 1e4cc384ab Fixed some typos in ECPG regression test suite that resulted in regression test failures on some architectures.
By Zoltán Böszörményi.
2010-02-03 13:56:27 +00:00
Michael Meskes cedae13017 Fixed NaN/Infinity problems in ECPG for float/double/numeric/decimal by making it OS independant.
Patch done by Zoltán Böszörményi.
2010-02-02 16:09:12 +00:00