summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test
AgeCommit message (Collapse)Author
2014-05-08Un-break ecpg test suite under --disable-integer-datetimes.Noah Misch
Commit 4318daecc959886d001a6e79c6ea853e8b1dfb4b broke it. The change in sub-second precision at extreme dates is normal. The inconsistent truncation vs. rounding is essentially a bug, albeit a longstanding one. Back-patch to 8.4, like the causative commit.
2014-05-06With ecpg exclusion removed, re-run pgindent for 9.4Bruce Momjian
Report by Tom Lane
2014-05-06pgindent run for 9.4Bruce Momjian
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
2014-05-05Replace SYSTEMQUOTEs with Windows-specific wrapper functions.Heikki Linnakangas
It's easy to forget using SYSTEMQUOTEs when constructing command strings for system() or popen(). Even if we fix all the places missing it now, it is bound to be forgotten again in the future. Introduce wrapper functions that do the the extra quoting for you, and get rid of SYSTEMQUOTEs in all the callers. We previosly used SYSTEMQUOTEs in all the hard-coded command strings, and this doesn't change the behavior of those. But user-supplied commands, like archive_command, restore_command, COPY TO/FROM PROGRAM calls, as well as pgbench's \shell, will now gain an extra pair of quotes. That is desirable, but if you have existing scripts or config files that include an extra pair of quotes, those might need to be adjusted. Reviewed by Amit Kapila and Tom Lane
2014-04-23ecpg: Add additional files to .gitignorePeter Eisentraut
These are test files added by f9179685371b74bf4752bf3f87846e5625cf91fa.
2014-04-09Several fixes to array handling in ecpg.Michael Meskes
Patches by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
2014-02-17Fix handling of wide datetime input/output.Noah Misch
Many server functions use the MAXDATELEN constant to size a buffer for parsing or displaying a datetime value. It was much too small for the longest possible interval output and slightly too small for certain valid timestamp input, particularly input with a long timezone name. The long input was rejected needlessly; the long output caused interval_out() to overrun its buffer. ECPG's pgtypes library has a copy of the vulnerable functions, which bore the same vulnerabilities along with some of its own. In contrast to the server, certain long inputs caused stack overflow rather than failing cleanly. Back-patch to 8.4 (all supported versions). Reported by Daniel Schüssler, reviewed by Tom Lane. Security: CVE-2014-0063
2014-01-16Split ecpg_execute() in constituent partsAlvaro Herrera
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-16Split ECPGdo() in constituent partsAlvaro Herrera
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-13Always use the same way to addres a descriptor in ecpg's regression tests.Michael Meskes
2014-01-09Changed regression test to ecpg test suite for alignment problem just with lastMichael Meskes
commit.
2014-01-09Fix descriptor output in ECPG.Michael Meskes
While working on most platforms the old way sometimes created alignment problems. This should fix it. Also the regresion tests were updated to test for the reported case. Report and fix by MauMau <maumau307@gmail.com>
2014-01-07Update copyright for 2014Bruce Momjian
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
2013-11-26ECPG: Add EXEC SQL CLOSE C to the tests.Michael Meskes
Patch by Boszormenyi Zoltan <zb@cybertec.at>
2013-11-26ECPG: Free the malloc()'ed variables in the test so it comes out clean onMichael Meskes
Valgrind runs. Patch by Boszormenyi Zoltan <zb@cybertec.at>
2013-11-10Fix whitespace issues found by git diff --check, add gitattributesPeter Eisentraut
Set per file type attributes in .gitattributes to fine-tune whitespace checks. With the associated cleanups, the tree is now clean for git
2013-11-09Fix ECPG compiler warning.Robert Haas
Commit 9b4d52f2095be96ca238ce41f6963ec56376491f failed to notice that pg_regress_ecpg needed updating. This patch was independently submitted by both David Rowley and Andres Freund.
2013-11-03Changed test case slightly so it doesn't have an unused typedef.Michael Meskes
2013-10-22Get rid of use of asprintf() in favor of a more portable implementation.Tom Lane
asprintf(), aside from not being particularly portable, has a fundamentally badly-designed API; the psprintf() function that was added in passing in the previous patch has a much better API choice. Moreover, the NetBSD implementation that was borrowed for the previous patch doesn't work with non-C99-compliant vsnprintf, which is something we still have to cope with on some platforms; and it depends on va_copy which isn't all that portable either. Get rid of that code in favor of an implementation similar to what we've used for many years in stringinfo.c. Also, move it into libpgcommon since it's not really libpgport material. I think this patch will be enough to turn the buildfarm green again, but there's still cosmetic work left to do, namely get rid of pg_asprintf() in favor of using psprintf(). That will come in a followon patch.
2013-10-13Add use of asprintf()Peter Eisentraut
Add asprintf(), pg_asprintf(), and psprintf() to simplify string allocation and composition. Replacement implementations taken from NetBSD. Reviewed-by: Álvaro Herrera <alvherre@2ndquadrant.com> Reviewed-by: Asif Naeem <anaeem.it@gmail.com>
2013-07-29Sync ECPG with WITH ORDINALITY changesGreg Stark
2013-07-19Initialize day of year value.Michael Meskes
There are cases where the day of year value in struct tm is used, but it never got calculated. Problem found by Coverity scan.
2013-01-12Extend and improve use of EXTRA_REGRESS_OPTS.Andrew Dunstan
This is now used by ecpg tests, and not clobbered by pg_upgrade tests. This change won't affect anything that doesn't set this environment variable, but will enable the buildfarm to control exactly what port regression test installs will be running on, and thus to detect possible rogue postmasters more easily. Backpatch to release 9.2 where EXTRA_REGRESS_OPTS was first used.
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-02-18Make sure all connection paramters are used in call to PQconnectdbParams.Michael Meskes
2012-02-13Do not use the variable name when defining a varchar structure in ecpg.Michael Meskes
With a unique counter being added anyway, there is no need anymore to have the variable name listed, too.
2012-02-02ecpg: Improve test buildingPeter Eisentraut
Further improve on commit c75e1436467f32a06b5ab9d594d2a390e7f4594d. Instead of building both .o files and binaries in the same make rule, just rely on the normal .c -> .o rule. This will ensure that dependency tracking is used when enabled. To do this, disable the implicit direct .c -> binary rule globally, which will also prevent the original problem (*.dSYM junk) from reappearing elsewhere.
2012-01-04Made code in ecpg better readable.Michael Meskes
2012-01-02pg_regress: Replace exit_nicely() with exit() plus atexit() hookPeter Eisentraut
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-12-18Added test for cursor handling on different connections to regression testMichael Meskes
suite for ecpg.
2011-12-10Enable compiling with the mingw-w64 32 bit compiler.Andrew Dunstan
Original patch by Lars Kanis, reviewed by Nishiyama Tomoaki and tweaked some by me. This compiler, or at least the latest version of it, is currently broken, and only passes the regression tests if built with -O0.
2011-07-18Adapted expected result for latest change to ecpglib.Michael Meskes
2011-06-15Use single quotes in preference to double quotes for protecting pathnames.Tom Lane
Per recommendation from Peter. Neither choice is bulletproof, but this is the existing style and it does help prevent unexpected environment variable substitution.
2011-06-14Fix assorted issues with build and install paths containing spaces.Tom Lane
Apparently there is no buildfarm critter exercising this case after all, because it fails in several places. With this patch, build, install, check-world, and installcheck-world pass for me on OS X.
2011-04-15Rename pg_regress option --multibyte to --encodingPeter Eisentraut
Also refactor things a little bit so that the same methods for setting test locale and encoding can be used everywhere.
2011-04-10Adjust regression tests on cube and ECPG for MinGW 64 bit compiler.Andrew Dunstan
Backport to 9.0, we're not supporting this compiler on earlier releases.
2011-02-15Add CheckTableNotInUse calls in DROP TABLE and DROP INDEX.Tom Lane
Recent releases had a check on rel->rd_refcnt in heap_drop_with_catalog, but failed to cover the possibility of pending trigger events at DROP time. (Before 8.4 we didn't even check the refcnt.) When the trigger events were eventually fired, you'd get "could not open relation with OID nnn" errors, as in recent report from strk. Better to throw a suitable error when the DROP is attempted. Also add a similar check in DROP INDEX. Back-patch to all supported branches.
2011-01-08In ecpg's parser removed a fixed length limit for constants defining an ↵Michael Meskes
array dimension.
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-12-24Allow vpath builds and regression tests to succeed on Mingw. Backpatch to ↵Andrew Dunstan
release 8.4 - earlier releases would require more changes and it's not worth the trouble.
2010-11-23Remove useless whitespace at end of linesPeter Eisentraut
2010-10-20Fix ecpg test building process to not generate *.dSYM junk on Macs.Tom Lane
The trick is to not try to build executables directly from .c files, but to always build the intermediate .o files. For obscure reasons, Darwin's version of gcc will leave debug cruft behind in the first case but not the second. Per complaint from Robert Haas.
2010-10-13Remove executable permission from files where it doesn't belongPeter Eisentraut
2010-09-24Still more .gitignore cleanup.Tom Lane
Fix overly-enthusiastic ignores, as identified by git ls-files -i --exclude-standard
2010-09-22Add gitignore files for ecpg regression tests.Magnus Hagander
Backpatch to 8.2 as that's how far the structure looks the same.
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-08-19Remove extra newlines at end and beginning of files, add missing newlinesPeter Eisentraut
at end of files.
2010-08-17Applied Zoltan's patch to fix a few memleaks in ecpg's pgtypeslib.Michael Meskes
2010-07-20Make ECPG regression tests independent of standard_conforming_strings.Robert Haas
Per buildfarm, again.