Commit Graph

3193 Commits

Author SHA1 Message Date
Tom Lane 727ffa1d1e Clean up pg_SSPI_error() coding a little bit: make the messages more
consistent, translate where intended, const-ify declarations.
Resolves a gripe from Alvaro as well as some stuff I didn't like.
2009-03-22 18:06:35 +00:00
Tom Lane 0fd85d7879 Remove the datetime keywords ABSTIME and RELTIME, which we'd been treating as
noise words for the last twelve years, for compatibility with Berkeley-era
output formatting of the special INVALID values for those datatypes.
Considering that the datatypes themselves have been deprecated for awhile,
this is taking backwards compatibility a little far.  Per gripe from Josh
Berkus.
2009-03-22 01:12:32 +00:00
Alvaro Herrera fb2ebae498 Add comments about kwlookup.c expectations 2009-03-08 16:53:30 +00:00
Alvaro Herrera 328d235571 Separate the key word list that lived in keywords.c into a new header file
kwlist.h, to avoid having to link the backend object file into other programs
like pg_dump.  We can now simply symlink a single source file from the backend
(kwlookup.c, containing the shared routine ScanKeywordLookup) and compile it
locally, which is a lot cleaner.
2009-03-07 00:13:58 +00:00
Peter Eisentraut cd3b750929 Sort the output of --help mostly alphabetical, make it align better, make
help of pg_dump and pg_dumpall more similar.
2009-02-25 13:03:07 +00:00
Bruce Momjian e795b56322 ecpg requires libpq; add Makefile rules to require libpq to be built
first.

Alvaro Herrera
2009-02-07 17:17:34 +00:00
Michael Meskes 78cbd49826 Mixing long and int entries of a union only works on some architectures. 2009-02-05 08:28:47 +00:00
Michael Meskes 649a1252b7 Added result checks for calls to gmtime(). 2009-02-04 08:51:10 +00:00
Michael Meskes 08ffa78483 Argh, wrong line copied again. 2009-02-03 08:55:45 +00:00
Michael Meskes efd019fc94 Fixed copy&paste mistake that made library use uninitialized variable. 2009-02-03 08:48:29 +00:00
Michael Meskes 80f95a6500 When changing a regression test file one should also change the expected output file. 2009-02-02 16:54:28 +00:00
Michael Meskes 934eab7cd5 Set memory segment to '0', just to be sure. 2009-02-02 16:49:50 +00:00
Michael Meskes 2d3c691146 Fixed auto allocation for binary data types. 2009-02-02 16:14:06 +00:00
Michael Meskes 77ca045384 Fixed bug in %s handling. 2009-02-02 15:35:28 +00:00
Peter Eisentraut cb629f7225 Make messages consistent with existing ones 2009-01-30 12:53:43 +00:00
Peter Eisentraut c05460fe50 Whitespace fix in message 2009-01-30 12:53:12 +00:00
Peter Eisentraut 7adbd76655 Message fix 2009-01-29 09:38:38 +00:00
Magnus Hagander 16c46d5d7a Go over all OpenSSL return values and make sure we compare them
to the documented API value. The previous code got it right as
it's implemented, but accepted too much/too little compared to
the API documentation.

Per comment from Zdenek Kotala.
2009-01-28 15:06:47 +00:00
Peter Eisentraut 39ab3c1c61 Message format tuning 2009-01-26 10:19:44 +00:00
Peter Eisentraut 3b35a904aa Message style review 2009-01-23 12:43:32 +00:00
Peter Eisentraut 9c4b69ed5c Recreate ecpg_config.h with a stamp file created by config.status, same
way pg_config.h is handled.  This avoids reruns of config.status on every
build, if configure has been rerun.
2009-01-22 22:27:13 +00:00
Tom Lane cc1d292d78 Fix accidental (I suppose) introduction of non-ASCII quote marks. 2009-01-19 17:17:50 +00:00
Peter Eisentraut 0d8c613180 Message wordsmithing 2009-01-19 08:59:13 +00:00
Peter Eisentraut 19afb4e805 Wordsmithing 2009-01-16 09:15:03 +00:00
Peter Eisentraut cb05ab81a8 NLS cleanup in ecpglib
Replace leftover instances of _() by ecpg_gettext(), the latter being the
correct way to refer to the library's message catalog, instead of the one of
the program using the library.

Drop NLS support for ecpg_log(), which is a debugging instrument similar to
elog() in the backend.

We cannot support NLS in the ecpg compatlib, because that requires
ecpg_gettext, which is in ecpglib, which is not a dependency of compatlib.  It
doesn't seem worthwhile to worry about this, since the only translatable
string is "out of memory", and gettext probably won't be able to do much
without memory either.

Adjust messages to project style.
2009-01-15 11:52:55 +00:00
Peter Eisentraut cbb1358b18 Build needed things in src/test/regress/ first. And some build rules
normalization.
2009-01-15 09:30:20 +00:00
Peter Eisentraut 08585dcf13 misc.o depends on pg_config_paths.h when --enable-nls is used. 2009-01-14 14:54:35 +00:00
Magnus Hagander 64580224f9 Remove special-handling of usernames with Kerberos authentication. We will
now always use the system username as the default, and not try to pick it up
from the kerberos ticket.

This fixes the spurious error messages that show up on kerberos-enabled builds
when not actually using kerberos, and puts it in line with how other authentication
methods work.
2009-01-13 10:43:21 +00:00
Tom Lane d25ada4d78 Fix libpq so that it reports PGRES_EMPTY_QUERY not PGRES_COMMAND_OK when an
empty query string is passed to PQexecParams and related functions.  Its
handling of the NoData response to Describe messages was subtly incorrect.
Per my report of yesterday.

Although I consider this a bug, it's a behavioral change that might affect
applications, so not back-patched.

In passing fix a second issue in the same code: it didn't react well to an
out-of-memory failure while trying to make the PGresult object.
2009-01-09 18:50:03 +00:00
Magnus Hagander 75eafe965e Don't require pqGetHomeDirectory to succeed if the user has specified
hardcoded paths for SSL rootcert/crl/clientcert/key.

As noted by Andrew Chernow
2009-01-07 12:02:46 +00:00
Peter Eisentraut 46866e92bd Fix for cross-compilation between mingw32 and something else. The choice
of pwd vs. pwd -W is correctly a function of the build system, not the
host system.
2009-01-05 09:54:13 +00:00
Peter Eisentraut 26af72b46b Allow out-of-tree builds on mingw and cygwin
Author: Richard Evans <richard.evans@blueallegro.net>
2009-01-05 09:27:20 +00:00
Peter Eisentraut a3114e52f6 Split the ecpg translation support into a separate catalog for the ecpg
preprocessor and the library.  This is useful for a number of reasons:

* The preprocessor and the library are in some cases installed in separate
packages and used by different classes of users.

* The library MO files need a different versioning scheme to account for the
soname.

* The makefiles are simpler, more robust, and easier to maintain this way.
(NLS web site was prone to break everytime a build rule changes.)

* Translators might choose to focus on the ecpglib, because that is more
user-facing.

* There was virtually no overlap, so nothing is lost.
2009-01-02 13:26:54 +00:00
Tom Lane 62b64cbb48 Fix a couple of missed copyright dates. 2009-01-01 17:59:40 +00:00
Bruce Momjian 511db38ace Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Michael Meskes bdfde2b390 Finally the last test. 2008-12-29 17:48:11 +00:00
Michael Meskes 3c82099c82 First rounf of whitespace changes. Everything but connect-test1 should be fine. 2008-12-29 17:07:06 +00:00
Michael Meskes e05c5a908b Applied patch by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> to
fix segfault on non-glibc systems.
2008-12-17 16:52:07 +00:00
Tom Lane d1c24460bf Fix cast-away-const problem as well as bogus calculation of required buffer size. 2008-12-15 19:07:48 +00:00
Michael Meskes 3f7e1e4b91 Do not try to change a const variable. 2008-12-15 15:34:07 +00:00
Magnus Hagander 5f3724dd7c Support specifying filename for SSL certificate, key, root certificate store
and certificate revokation list by using connection parameters or environment
variables.

Original patch by Mark Woodward, heavily reworked by Alvaro Herrera and
Magnus Hagander.
2008-12-15 10:28:22 +00:00
Michael Meskes 192dd845a1 Using clause has to accept signed numeric constants too. 2008-12-12 12:14:43 +00:00
Peter Eisentraut 218b4e8dd8 Append major version number and for libraries soname major version number
to the gettext domain name, to simplify parallel installations.

Also, rename set_text_domain() to pg_bindtextdomain(), because that is what
it does.
2008-12-11 07:34:09 +00:00
Peter Eisentraut b2971e2048 Set up ar, dlltool, dllwrap, and windres for cross-compiling if necessary.
Plus some makefile cleanup.

part of a patch from Richard Evans
2008-12-07 08:36:22 +00:00
Magnus Hagander 30c52532d2 Comment said we don't free the lockarray, and why. The proper fix is to
make the code do what the comment says...
2008-12-04 14:07:42 +00:00
Bruce Momjian 98be3b49be Fix typo in recent SSL unload patch.
Kris Jurka
2008-12-04 02:52:31 +00:00
Magnus Hagander 4e81628653 Properly unregister OpenSSL callbacks when libpq is done with
it's connection. This is required for applications that unload
the libpq library (such as PHP) in which case we'd otherwise
have pointers to these functions when they no longer exist.

This needs a bit more testing before we can consider a backpatch,
so not doing that yet.

In passing, remove unused functions in backend/libpq.

Bruce Momjian and Magnus Hagander, per report and analysis
by Russell Smith.
2008-12-03 20:04:26 +00:00
Magnus Hagander 2c69fa0c38 Change wildcard cerfificate mapping to be much simler - we now only match
the * character at the beginning of a pattern, and it does not match
subdomains.

Since this means we no longer need fnmatch, remove the imported implementation
from port, along with the autoconf check for it.
2008-12-02 10:39:31 +00:00
Michael Meskes ac03efbb9c Removed port testing. 2008-12-01 11:37:37 +00:00
Tom Lane b651b2a5c2 Make sure we give an appropriate user-facing error when attempting
to drop a table that is referenced by an open cursor.  Fix unstable
ecpg regression test result that was produced by this oversight.
2008-11-29 00:13:21 +00:00