summaryrefslogtreecommitdiff
path: root/src/interfaces
AgeCommit message (Collapse)Author
2010-11-12Improved parallel make supportPeter Eisentraut
Replace for loops in makefiles with proper dependencies. Parallel make can now span across directories. Also, make -k and make -q work properly. GNU make 3.80 or newer is now required.
2010-11-02Some cleanup in ecpg code:Michael Meskes
Use bool as type for booleans instead of int. Do not implicitely cast size_t to int. Make the compiler stop complaining about unused variables by adding an empty statement.
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-14Applied patch by Itagaki Takahiro to fix incorrect status calculation inMichael Meskes
ecpglib. Instead of parsing the statement just as ask the database server. This patch removes the whole client side track keeping of the current transaction status.
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-22More fixes for libpq's .gitignore file.Tom Lane
The previous patches failed to cover a lot of symlinks that are only added in platform-specific cases. Make the lists match what's in the Makefile for each branch.
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-22Convert cvsignore to gitignore, and add .gitignore for build targets.Magnus Hagander
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-09-19Fix several broken $PostgreSQL$ keywords. Noted while experimentingTom Lane
with Magnus's script to remove these.
2010-09-10Cursor names in the backend are not case-sensitve. This change makes sure thatMichael Meskes
ecpg also does not regard cursor names as case-sensitive. Thanks to Zoltan Boszormenyi for the patch.
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-08-13Minor #include cleanup.Tom Lane
I just noticed that libpq's pqsignal.h was violating our general inclusion style guidelines by explicitly including postgres_fe.h. Remove that, and put it in pqsignal.c where it belongs.
2010-08-02Fix an ancient typo that prevented the detection of conflicting fields whenTom Lane
interval input "invalid" was specified together with other fields. Spotted by Neil Conway with the help of a clang warning. Although this has been wrong since the interval code was written more than 10 years ago, it doesn't affect anything beyond which error message you get for a wrong input, so not worth back-patching very far.
2010-07-20Make ECPG regression tests independent of standard_conforming_strings.Robert Haas
Per buildfarm, again.
2010-07-19Portability fixes for Solaris for requirepeer feature patchPeter Eisentraut
per report from Dave Page
2010-07-18Fix up poor handling of unsupported-platform case in requirepeer patch.Tom Lane
2010-07-18Fix thinko in recent patch: 'sock' should be 'conn->sock'.Tom Lane
2010-07-18Add SO_PEERCRED check in new unix domain socket permission checking code.Bruce Momjian
2010-07-18Add server authentication over Unix-domain socketsPeter Eisentraut
This adds a libpq connection parameter requirepeer that specifies the user name that the server process is expected to run under. reviewed by KaiGai Kohei
2010-07-14Allow full SSL certificate verification (wherein libpq checks its host nameTom Lane
parameter against server cert's CN field) to succeed in the case where both host and hostaddr are specified. As with the existing precedents for Kerberos, GSSAPI, SSPI, it is the calling application's responsibility that host and hostaddr match up --- we just use the host name as given. Per bug #5559 from Christopher Head. In passing, make the error handling and messages for the no-host-name-given failure more consistent among these four cases, and correct a lie in the documentation: we don't attempt to reverse-lookup host from hostaddr if host is missing. Back-patch to 8.4 where SSL cert verification was introduced.
2010-07-12Bump minor library version numbers, for 9.1 release.Bruce Momjian
2010-07-09Stamp HEAD as 9.1devel.Tom Lane
(And there was much rejoicing.)
2010-07-08Translation updates for 9.0beta3Peter Eisentraut
2010-07-08Make the Windows tcp keepalive support depend on the existance of theMagnus Hagander
SIO_KEEPALIVE_VALS define instead of just WIN32, since MingW doesn't support this API (yet?).
2010-07-08Add support for TCP keepalives on Windows, both for backend and the newMagnus Hagander
libpq support.
2010-07-06Support setting the keepalive idle time on MacOS X.Robert Haas
MacOS X uses TCP_KEEPALIVE rather than TCP_KEEPIDLE for this purpose. Thanks to Fujii Masao for the review.
2010-07-06pgindent run for 9.0, second runBruce Momjian
2010-07-05Split the LDFLAGS make variable into two parts: LDFLAGS is now used forTom Lane
linking both executables and shared libraries, and we add on LDFLAGS_EX when linking executables or LDFLAGS_SL when linking shared libraries. This provides a significantly cleaner way of dealing with link-time switches than the former behavior. Also, make sure that the various platform-specific %.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that before. (I did not add these variables for the platforms that invoke $(LD) directly, however. It's not clear if we can do that safely, since for the most part we assume these variables use CC command-line syntax.) Per gripe from Aaron Swenson and subsequent investigation.
2010-06-23Add TCP keepalive support to libpq.Robert Haas
This adds four additional connection parameters to libpq: keepalives, keepalives_idle, keepalives_count, and keepalives_interval. keepalives default to on, per discussion, but can be turned off by specifying keepalives=0. The remaining parameters, where supported, can be used to adjust how often keepalives are sent and how many can be lost before the connection is broken. The immediate motivation for this patch is to make sure that walreceiver will eventually notice if the master reboots without closing the connection cleanly, but it should be helpful in other cases as well. Tollef Fog Heen, Fujii Masao, and me.
2010-06-16Refactor sprintf calls with computed format strings into multiple calls withPeter Eisentraut
constant format strings, so that the compiler can more easily check the formats for correctness.
2010-06-04Added variable handling for RETURNING clause to ecpg.Michael Meskes
While the values were correctly returned they were not moved into C variables as they should be. Closes: #5489
2010-06-03Translation updates for 9.0beta2Peter Eisentraut
2010-05-30Change the notation for calling functions with named parameters fromTom Lane
"val AS name" to "name := val", as per recent discussion. This patch catches everything in the original named-parameters patch, but I'm not certain that no other dependencies snuck in later (grepping the source tree for all uses of AS soon proved unworkable). In passing I note that we've dropped the ball at least once on keeping ecpg's lexer (as opposed to parser) in sync with the backend. It would be a good idea to go through all of pgc.l and see if it's in sync now. I didn't attempt that at the moment.
2010-05-26Rearrange libpq's SSL initialization to simplify it and make it handle someTom Lane
additional cases correctly. The original coding failed to load additional (chain) certificates from the client cert file, meaning that indirectly signed client certificates didn't work unless one hacked the server's root.crt file to include intermediate CAs (not the desired approach). Another problem was that everything got loaded into the shared SSL_context object, which meant that concurrent connections trying to use different sslcert settings could well fail due to conflicting over the single available slot for a keyed certificate. To fix, get rid of the use of SSL_CTX_set_client_cert_cb(), which is deprecated anyway in the OpenSSL documentation, and instead just unconditionally load the client cert and private key during connection initialization. This lets us use SSL_CTX_use_certificate_chain_file(), which does the right thing with additional certs, and is lots simpler than the previous hacking about with BIO-level access. A small disadvantage is that we have to load the primary client cert a second time with SSL_use_certificate_file, so that that one ends up in the correct slot within the connection's SSL object where it can get paired with the key. Given the other overhead of making an SSL connection, that doesn't seem worth worrying about. Per discussion ensuing from bug #5468.
2010-05-25Add missing newlines to some SSL-related error messages. Noted while testing.Tom Lane
2010-05-25Replace self written 'long long int' configure test by standard ↵Michael Meskes
'AC_TYPE_LONG_LONG_INT' macro call.
2010-05-25Added a configure test for "long long" datatypes. So far this is only used ↵Michael Meskes
in ecpg and replaces the old test that was kind of hackish.
2010-05-20Ecpg now accepts "long long" datatypes even if "long" is 64bit wide. This ↵Michael Meskes
used to cover the equally long "long long" type. This patch closes bug #5464.
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