summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg
AgeCommit message (Collapse)Author
2012-01-05Ecpglib stores variables that are used in DECLARE statements in a global list.Michael Meskes
This list is now freed when the last connection has been closed. Closes: #6366
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-27Standardize treatment of strcmp() return valuePeter Eisentraut
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
2011-12-18Mark variables as const in pgtypeslib if they only carry a format string.Michael Meskes
2011-12-18Added test for cursor handling on different connections to regression testMichael Meskes
suite for ecpg.
2011-12-18In ecpg removed old leftover check for given connection name.Michael Meskes
Ever since we introduced real prepared statements this should work for different connections. The old solution just emulating prepared statements, though, wasn't able to handle this. Closes: #6309
2011-12-10Miscellaneous cleanup to silence compiler warnings seen on Mingw.Andrew Dunstan
Remove some dead code, conditionally declare some items or call some code, and fix one or two declarations.
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-12-04Applied another patch by Zoltan to fix memory alignement issues in ecpg's sqldaMichael Meskes
code.
2011-11-17Applied Zoltan's patch to correctly align interval and timestamp data in ↵Michael Meskes
ecpg's sqlda.
2011-11-13Applied patch by Zoltan to fix copy&paste bug in ecpg's sqlda handling.Michael Meskes
2011-11-01Clean up whitespace and indentation in parser and scanner filesPeter Eisentraut
These are not touched by pgindent, so clean them up a bit manually.
2011-10-28De-parallelize ecpg build some more.Tom Lane
Make sure ecpg/include/ is rebuilt before the other subdirectories, so that ecpg_config.h is up to date. This is not likely to matter during production builds, only development, so no back-patch.
2011-09-11Remove many -Wcast-qual warningsPeter Eisentraut
This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining.
2011-09-11Fix additional format warningPeter Eisentraut
Apparently, this only happens on 64-bit platforms.
2011-09-10Add missing format attributesPeter Eisentraut
Add __attribute__ decorations for printf format checking to the places that were missing them. Fix the resulting warnings. Add -Wmissing-format-attribute to the standard set of warnings for GCC, so these don't happen again. The warning fixes here are relatively harmless. The one serious problem discovered by this was already committed earlier in cf15fb5cabfbc71e07be23cfbc813daee6c5014f.
2011-09-08Add missing format argument to ecpg_log() callPeter Eisentraut
2011-09-02Fix brace indentation of commit 63d06ef59156719efd0208c62e764a69611b3f12 to ↵Michael Meskes
fit PostgreSQL style.
2011-09-01In ecpglib restore LC_NUMERIC in case of an error.Michael Meskes
2011-09-01Fix MinGW build, broken by my previous patch to add a setlocale() wrapperHeikki Linnakangas
on Windows. ecpglib doesn't link with libpgport, but picks and compiles the .c files it needs individually. To cope with that, move the setlocale() wrapper from chklocale.c to a separate setlocale.c file, and include that in ecpglib.
2011-08-25Add "%option warn" to all flex input files that lacked it.Tom Lane
This is recommended in the flex manual, and there seems no good reason not to use it everywhere.
2011-07-18Adapted expected result for latest change to ecpglib.Michael Meskes
2011-07-18Made ecpglib write double with a precision of 15 digits.Michael Meskes
Patch originally by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.
2011-06-27Add missing file to GETTEXT_FILESPeter Eisentraut
This doesn't actually change the resulting set of strings, but better be correct.
2011-06-27Add the possibility to pass --flag arguments to xgettext callsPeter Eisentraut
The --flag argument can be used to tell xgettext the arguments of which functions should be flagged with c-format in the PO files, instead of guessing based on the presence of format specifiers, which fails if no format specifiers are present but the translation accidentally introduces one. Appropriate flag settings have been added for each message catalog. based on a patch by Christoph Berg for bug #6066
2011-06-26Make _ be automatically included in GETTEXT_TRIGGERSPeter Eisentraut
Since it's globally defined in c.h, it should be treated as a gettext trigger everywhere.
2011-06-26Replace := by = in nls.mk filesPeter Eisentraut
It currently doesn't make a difference, but it's inconsistent with most other usage, and it might interfere with a future patch, so I'll change it all in a separate commit. Also, replace tabs with spaces for alignment.
2011-06-19Capitalization fixesPeter Eisentraut
2011-06-18Remove redundant lib*dll.def rules from .gitignoreMagnus Hagander
Since we now have a global rule in the root .gitignore, there's no need to keep directory-specific ones as well. Noted by Peter Eisentraut
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-15Rework parsing of ConstraintAttributeSpec to improve NOT VALID handling.Tom Lane
The initial commit of the ALTER TABLE ADD FOREIGN KEY NOT VALID feature failed to support labeling such constraints as deferrable. The best fix for this seems to be to fold NOT VALID into ConstraintAttributeSpec. That's a bit more general than the documented syntax, but it allows better-targeted syntax error messages. In addition, do some mostly-but-not-entirely-cosmetic code review for the whole NOT VALID patch.
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-06-14Move parse2.pl to parse.plPeter Eisentraut
We have a SCM, so we don't need to keep old versions of files around.
2011-06-09Translation updates for 9.1beta2Peter Eisentraut
2011-06-09Pgindent run before 9.1 beta2.Bruce Momjian
2011-05-10Prevent datebsearch() from crashing on base == NULL && nel == 0.Tom Lane
Normally nel == 0 works okay because the initial value of "last" will be less than "base"; but if "base" is zero then the calculation wraps around and we have a very large (unsigned) value for "last", so that the loop can be entered and we get a SIGSEGV on a bogus pointer. This is certainly the proximate cause of the recent reports of Windows builds crashing on 'infinity'::timestamp --- evidently, they're either not setting an active timezonetktbl, or setting an empty one. It's not yet clear to me why it's only happening on Windows and not happening on any buildfarm member. But even if that's due to some bug elsewhere, it seems wise for this function to not choke on the powerup values of timezonetktbl/sztimezonetktbl. I also changed the copy of this code in ecpglib, although I am not sure whether it's exposed to a similar hazard. Per report and stack trace from Richard Broersma.
2011-04-28Use non-literal format for possibly non-standard strftime formats.Andrew Dunstan
Per recent -hackers discussion. The formats in question are %G and %V, and cause warnings on MinGW at least. We assume the ecpg application knows what it's doing if it passes these formats to the library.
2011-04-28Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking ↵Andrew Dunstan
printf type functions. The style is set to "printf" for backwards compatibility everywhere except on Windows, where it is set to "gnu_printf", which eliminates hundreds of false error messages from modern versions of gcc arising from %m and %ll{d,u} formats.
2011-04-27Revert "Remove hard coded formats for INT64 and use configured settings ↵Andrew Dunstan
instead." This reverts commit 9b1508af8971c1627cda5bb65f5e9eddb9a1a55e. As requested by Tom.
2011-04-27Remove hard coded formats for INT64 and use configured settings instead.Andrew Dunstan
2011-04-25In libecpg do not set an sqlda field that is 'reserved for future use' unlessMichael Meskes
we know what should be stored in there.
2011-04-19Add gitignore entries for Windows MSVC buildsPeter Eisentraut
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-12Suppress compiler warnings about "value computed is not used".Tom Lane
The recent patch to remove gcc 4.6 warnings created some new ones, at least on my rather old gcc version. Try to make everybody happy by casting to "void" when we just want to discard the result.
2011-04-11Clean up most -Wunused-but-set-variable warnings from gcc 4.6Peter Eisentraut
This warning is new in gcc 4.6 and part of -Wall. This patch cleans up most of the noise, but there are some still warnings that are trickier to remove.
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-04-10pgindent run before PG 9.1 beta 1.Bruce Momjian
2011-03-27fix up a couple non-prototypes of the form foo() to be foo(void) -- found ↵Greg Stark
using -Wstrict-prototypes