summaryrefslogtreecommitdiff
path: root/src/interfaces
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-30Fix a couple of places where the result of fgets() wasn't checked.Tom Lane
This is mostly to suppress compiler warnings, although in principle the cases could result in undesirable behavior. Martin Pitt
2010-04-28Fix typo that had the code check the same thing twice.Magnus Hagander
Fujii Masao
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-17Fix peculiar, untranslatable message concatenation attemptPeter Eisentraut
2010-03-13Add libpq warning message if the .pgpass-retrieved password fails.Bruce Momjian
Add ERRCODE_INVALID_PASSWORD sqlstate error code.
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-08Require hostname to be set when using GSSAPI authentication. Without it,Magnus Hagander
the GSSAPI libraries crash. Noted by Zdenek Kotala
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-03-03Fix a couple of places that would loop forever if attempts to read a stdio fileTom Lane
set ferror() but never set feof(). This is known to be the case for recent glibc when trying to read a directory as a file, and might be true for other platforms/cases too. Per report from Ed L. (There is more that we ought to do about his report, but this is one easily identifiable issue.)
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-17Stamp HEAD as 9.0devel, and update various places that were referring to 8.5Tom Lane
(hope I got 'em all). Per discussion, this release will be 9.0 not 8.5.
2010-02-16Have SELECT and CREATE TABLE AS queries return a row count. While thisBruce Momjian
is invisible in psql, other interfaces, like libpq, make this value visible. Boszormenyi Zoltan
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-05Modify recently added PQconnectdbParams() with new argument, expand_dbname.Joe Conway
If expand_dbname is non-zero and dbname contains an = sign, it is taken as a conninfo string in exactly the same way as if it had been passed to PQconnectdb. This is equivalent to the way PQsetdbLogin() works, allowing PQconnectdbParams() to be a complete alternative. Also improve the way the new function is called from psql and replace a previously missed call to PQsetdbLogin() in psql. Additionally use PQconnectdbParams() for pg_dump and friends, and the bin/scripts command line utilities such as vacuumdb, createdb, etc. Finally, update the documentation for the new parameter, as well as the nuances of precedence in cases where key words are repeated or duplicated in the conninfo string.
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-28Introduce two new libpq connection functions, PQconnectdbParams andJoe Conway
PQconnectStartParams. These are analogous to PQconnectdb and PQconnectStart respectively. They differ from the legacy functions in that they accept two NULL-terminated arrays, keywords and values, rather than conninfo strings. This avoids the need to build the conninfo string in cases where it might be inconvenient to do so. Includes documentation. Also modify psql to utilize PQconnectdbParams rather than PQsetdbLogin. This allows the new config parameter application_name to be set, which in turn is displayed in the pg_stat_activity view and included in CSV log entries. This will also ensure both new functions get regularly exercised. Patch by Guillaume Lelarge with review and minor adjustments by Joe Conway.
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-21Fix unsafe loop test, and declare as_ident as bool rather than int.Robert Haas