summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg
AgeCommit message (Collapse)Author
2010-05-13Translation updatePeter Eisentraut
2010-05-12Add PGFILEDESC description to Makefiles for all /contrib executables.Bruce Momjian
Add PGAPPICON to all executable makefiles.
2010-05-09Adjust comments about avoiding use of printf's %.*s.Tom Lane
My initial impression that glibc was measuring the precision in characters (which is what the Linux man page says it does) was incorrect. It does take the precision to be in bytes, but it also tries to truncate the string at a character boundary. The bottom line remains the same: it will mess up if the string is not in the encoding it expects, so we need to avoid %.*s anytime there's a significant risk of that. Previous code changes are still good, but adjust the comments to reflect this knowledge. Per research by Hernan Gonzalez.
2010-05-08Work around a subtle portability problem in use of printf %s format.Tom Lane
Depending on which spec you read, field widths and precisions in %s may be counted either in bytes or characters. Our code was assuming bytes, which is wrong at least for glibc's implementation, and in any case libc might have a different idea of the prevailing encoding than we do. Hence, for portable results we must avoid using anything more complex than just "%s" unless the string to be printed is known to be all-ASCII. This patch fixes the cases I could find, including the psql formatting failure reported by Hernan Gonzalez. In HEAD only, I also added comments to some places where it appears safe to continue using "%.*s".
2010-05-07ECPG connect routine only checked for NULL to find empty parameters, but ↵Michael Meskes
user and password can also be "".
2010-04-03Make ecpg in line with other compilers in that it deletes its output if ↵Michael Meskes
there was an error processing the input file. Work done by Zoltan.
2010-04-03Message quoting style tuningPeter Eisentraut
2010-04-02FATAL errors are meant to stop ecpg immediately, e.g. because the syntax isMichael Meskes
corrupted. This error, however, does is not a compilation problem but a runtime one, so we can keep compiling but still have to declare ERROR.
2010-04-01Zoltan beautified his hidden-variable-patch for ecpg. This also makes sure ↵Michael Meskes
we get an error message instead of a warning if the variable have different types.
2010-04-01Applied Zoltan's patch to make ecpg spit out warnings if a local variable ↵Michael Meskes
hides a global one with the same name.
2010-03-31Give a more precise error message if a variable is re-used as cursor name in ↵Michael Meskes
ecpg.
2010-03-23Remove useless double assignmentPeter Eisentraut
GCC 4.5 complained about it.
2010-03-22Fixed ECPG regression test to make sure it uses absolute paths for includeMichael Meskes
files instead of relative ones which break vpath builds.
2010-03-21ECPG's parser now accepts and handles variables as arguments for the FREE ↵Michael Meskes
command. Informix allows variables as argument to the embedded SQL command FREE. Given that we only allow freeing cursors via FREE for compatibility reasons only we should do the same.
2010-03-21Adjusted regression test results to the change I made in debug output for ↵Michael Meskes
ecpglib.
2010-03-21Correctly name functions in debug output in ecpglib. When the functions wereMichael Meskes
refactored the debug output wasn't adjusted.
2010-03-21ECPG only copied #include statements instead of processing them according toMichael Meskes
commandline option "-i". This change fixes this and adds a test case. It also honors #include_next, although this is probably never used for embedded SQL.
2010-03-20Fixed ecpg parser to allow more than one C preprocessor command inside a ↵Michael Meskes
declare section.
2010-03-09ecpg now adds a unique counter to its varchar struct definitions to make ↵Michael Meskes
these definitions unique, too. It used to use the linenumber but in the rare case of two definitions in one line this was not unique.
2010-03-08Better test the content of the SQLSTATE string in ecpglib than the pointer.Michael Meskes
2010-03-05In case the connection magically disappears libecpg only returns an internalMichael Meskes
error sqlstate. This change makes it return a correct value..
2010-02-27Make sure ecpg uses the same header files in the same order as the backend.Michael Meskes
2010-02-27Insert a hack into get_float8_nan (both core and ecpg copies) to deal withTom Lane
the fact that NetBSD/mips is currently broken, as per buildfarm member pika. Also add regression tests to ensure that get_float8_nan and get_float4_nan are exercised even on platforms where they are not needed by float8in/float4in. Zoltán Böszörményi and Tom Lane
2010-02-26Revert pgindent changes to ecpg include files that are part of ecpgBruce Momjian
regession test output, and update pgindent script to avoid them in the future.
2010-02-26pgindent run for 9.0Bruce Momjian
2010-02-19Translation updates for 9.0alpha4Peter Eisentraut
2010-02-16Do not check nan values for infinity. Some system are not able to handle this.Michael Meskes
By Zoltán Böszörményi
2010-02-09First try to make this one ecpg regression test work on Windows too. I'm ↵Michael Meskes
just trying to figure out the minimal amount of defines needed.
2010-02-04Usage of isnan() in ECPG regression tests probably needs '#include ↵Michael Meskes
<float.h>' as well.
2010-02-04Streamlined array handling code in libecpg a little bit, in the process ↵Michael Meskes
fixing yet another incorrect log output.
2010-02-03Fixed some typos in ECPG regression test suite that resulted in regression ↵Michael Meskes
test failures on some architectures. By Zoltán Böszörményi.
2010-02-03Add #include <float.h> --- guessing the lack of this is why WindowsTom Lane
machines are all rejecting isinf() calls in this file.
2010-02-02Fixed NaN/Infinity problems in ECPG for float/double/numeric/decimal by ↵Michael Meskes
making it OS independant. Patch done by Zoltán Böszörményi.
2010-01-29Changed ECPG outofscope handling to always print out statements in the same ↵Michael Meskes
order so regression testing is possible, by Zoltan Boszormenyi
2010-01-29Fixed a few typos in ecpg. Two were in comments, the third made a log output ↵Michael Meskes
reverse yes and no.
2010-01-26Added test case that was part of Zoltan's patch but apparently wasn't part ↵Michael Meskes
of my commit.
2010-01-26Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to add out-of-scope ↵Michael Meskes
cursor support to native mode.
2010-01-22Make argument const char * as per Takahiro Itagaki's suggestion.Michael Meskes
2010-01-22Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix problem in ↵Michael Meskes
auto-prepare mode if the connection is closed and re-opened and the previously prepared query is issued again.
2010-01-15Added correct error handling in DESCRIBE statement processing by Boszormenyi ↵Michael Meskes
Zoltan <zb@cybertec.at>.
2010-01-15Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to add DESCRIBE ↵Michael Meskes
[OUTPUT] statement to ecpg.
2010-01-13Applied Zoltan's patch to make char the default sqlda type.Michael Meskes
Given that undefined types are handled as character strings anyway the type translation function can simply return the correcponding ECPGt_char type.
2010-01-13Fix SQL3 type return value.Michael Meskes
For non-SQL3 types ecpg used to return -Oid. This will break if there are enough Oids to fill the namespace. Therefore we play it safe and return 0 if there is no Oid->SQL3 tyoe mapping available.
2010-01-12Removed ecpg Changelog file that was only there for historical reasons and ↵Michael Meskes
isn't actively used anymore.
2010-01-08Also update ChangerLog file.Michael Meskes
2010-01-07Remove all the special-case code for INT64_IS_BUSTED, per decision thatTom Lane
we're not going to support that anymore. I did keep the 64-bit-CRC-with-32-bit-arithmetic code, since it has a performance excuse to live. It's a bit moot since that's all ifdef'd out, of course.
2010-01-06Replaced int64_t with int64 as Andrew suggested.Michael Meskes
2010-01-06Remove __FUNCTION__ keyword that is not recognized by som compilers.Michael Meskes
2010-01-06Removed test case using nan as float value because printf's output for nan isMichael Meskes
OS specific with some distinguishing between signaling and quiet nans. It's not really importnat for us here anyway.
2010-01-06Removed more inttypes.h stuff.Michael Meskes