aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test
Commit message (Collapse)AuthorAge
* Make ECPG test programs depend on "ecpg$(X)", not "ecpg".Noah Misch2014-11-02
| | | | | | | | | Cygwin builds require this of dependencies pertaining to pattern rules. On Cygwin, stat("foo") in the absence of a file with that exact name can locate foo.exe. While GNU make uses stat() for dependencies of ordinary rules, it uses readdir() to assess dependencies of pattern rules. Therefore, a pattern rule dependency should match any underlying file name exactly. Back-patch to 9.4, where the dependency was introduced.
* Fix missing dependencies in ecpg's test Makefiles.Tom Lane2014-05-08
| | | | | | | | | | | | Ensure that ecpg preprocessor output files are rebuilt when re-testing after a change in the ecpg preprocessor itself, or a change in any of several include files that get copied verbatim into the output files. The lack of these dependencies was what created problems for Kevin Grittner after the recent pgindent run. There's no way for --enable-depend to discover these dependencies automatically, so we've gotta put them into the Makefiles by hand. While at it, reduce the amount of duplication in the ecpg invocations.
* Un-break ecpg test suite under --disable-integer-datetimes.Noah Misch2014-05-08
| | | | | | | 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.
* With ecpg exclusion removed, re-run pgindent for 9.4Bruce Momjian2014-05-06
| | | | Report by Tom Lane
* pgindent run for 9.4Bruce Momjian2014-05-06
| | | | | This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
* Replace SYSTEMQUOTEs with Windows-specific wrapper functions.Heikki Linnakangas2014-05-05
| | | | | | | | | | | | | | | | | 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
* ecpg: Add additional files to .gitignorePeter Eisentraut2014-04-23
| | | | These are test files added by f9179685371b74bf4752bf3f87846e5625cf91fa.
* Several fixes to array handling in ecpg.Michael Meskes2014-04-09
| | | | Patches by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
* Fix handling of wide datetime input/output.Noah Misch2014-02-17
| | | | | | | | | | | | | | | | | 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
* Split ecpg_execute() in constituent partsAlvaro Herrera2014-01-16
| | | | | | | | | | | | 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.
* Split ECPGdo() in constituent partsAlvaro Herrera2014-01-16
| | | | | | | | | | | | | | | 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.
* Always use the same way to addres a descriptor in ecpg's regression tests.Michael Meskes2014-01-13
|
* Changed regression test to ecpg test suite for alignment problem just with lastMichael Meskes2014-01-09
| | | | commit.
* Fix descriptor output in ECPG.Michael Meskes2014-01-09
| | | | | | | | 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>
* Update copyright for 2014Bruce Momjian2014-01-07
| | | | | Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
* ECPG: Add EXEC SQL CLOSE C to the tests.Michael Meskes2013-11-26
| | | | Patch by Boszormenyi Zoltan <zb@cybertec.at>
* ECPG: Free the malloc()'ed variables in the test so it comes out clean onMichael Meskes2013-11-26
| | | | | | Valgrind runs. Patch by Boszormenyi Zoltan <zb@cybertec.at>
* Fix whitespace issues found by git diff --check, add gitattributesPeter Eisentraut2013-11-10
| | | | | Set per file type attributes in .gitattributes to fine-tune whitespace checks. With the associated cleanups, the tree is now clean for git
* Fix ECPG compiler warning.Robert Haas2013-11-09
| | | | | | | | Commit 9b4d52f2095be96ca238ce41f6963ec56376491f failed to notice that pg_regress_ecpg needed updating. This patch was independently submitted by both David Rowley and Andres Freund.
* Changed test case slightly so it doesn't have an unused typedef.Michael Meskes2013-11-03
|
* Get rid of use of asprintf() in favor of a more portable implementation.Tom Lane2013-10-22
| | | | | | | | | | | | | | | | 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.
* Add use of asprintf()Peter Eisentraut2013-10-13
| | | | | | | | | 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>
* Sync ECPG with WITH ORDINALITY changesGreg Stark2013-07-29
|
* Initialize day of year value.Michael Meskes2013-07-19
| | | | | There are cases where the day of year value in struct tm is used, but it never got calculated. Problem found by Coverity scan.
* Extend and improve use of EXTRA_REGRESS_OPTS.Andrew Dunstan2013-01-12
| | | | | | | | | | 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.
* Update copyrights for 2013Bruce Momjian2013-01-01
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* Make sure all connection paramters are used in call to PQconnectdbParams.Michael Meskes2012-02-18
|
* Do not use the variable name when defining a varchar structure in ecpg.Michael Meskes2012-02-13
| | | | With a unique counter being added anyway, there is no need anymore to have the variable name listed, too.
* ecpg: Improve test buildingPeter Eisentraut2012-02-02
| | | | | | | | | 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.
* Made code in ecpg better readable.Michael Meskes2012-01-04
|
* pg_regress: Replace exit_nicely() with exit() plus atexit() hookPeter Eisentraut2012-01-02
|
* Update copyright notices for year 2012.Bruce Momjian2012-01-01
|
* Added test for cursor handling on different connections to regression testMichael Meskes2011-12-18
| | | | suite for ecpg.
* Enable compiling with the mingw-w64 32 bit compiler.Andrew Dunstan2011-12-10
| | | | | | | 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.
* Adapted expected result for latest change to ecpglib.Michael Meskes2011-07-18
|
* Use single quotes in preference to double quotes for protecting pathnames.Tom Lane2011-06-15
| | | | | | Per recommendation from Peter. Neither choice is bulletproof, but this is the existing style and it does help prevent unexpected environment variable substitution.
* Fix assorted issues with build and install paths containing spaces.Tom Lane2011-06-14
| | | | | | 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.
* Rename pg_regress option --multibyte to --encodingPeter Eisentraut2011-04-15
| | | | | Also refactor things a little bit so that the same methods for setting test locale and encoding can be used everywhere.
* Adjust regression tests on cube and ECPG for MinGW 64 bit compiler.Andrew Dunstan2011-04-10
| | | | Backport to 9.0, we're not supporting this compiler on earlier releases.
* Add CheckTableNotInUse calls in DROP TABLE and DROP INDEX.Tom Lane2011-02-15
| | | | | | | | | | | | | 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.
* In ecpg's parser removed a fixed length limit for constants defining an ↵Michael Meskes2011-01-08
| | | | array dimension.
* Stamp copyrights for year 2011.Bruce Momjian2011-01-01
|
* Allow vpath builds and regression tests to succeed on Mingw. Backpatch to ↵Andrew Dunstan2010-12-24
| | | | release 8.4 - earlier releases would require more changes and it's not worth the trouble.
* Remove useless whitespace at end of linesPeter Eisentraut2010-11-23
|
* Fix ecpg test building process to not generate *.dSYM junk on Macs.Tom Lane2010-10-20
| | | | | | | 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.
* Remove executable permission from files where it doesn't belongPeter Eisentraut2010-10-13
|
* Still more .gitignore cleanup.Tom Lane2010-09-24
| | | | | Fix overly-enthusiastic ignores, as identified by git ls-files -i --exclude-standard
* Add gitignore files for ecpg regression tests.Magnus Hagander2010-09-22
| | | | Backpatch to 8.2 as that's how far the structure looks the same.
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* Remove extra newlines at end and beginning of files, add missing newlinesPeter Eisentraut2010-08-19
| | | | at end of files.