Commit Graph

3156 Commits

Author SHA1 Message Date
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
d1c24460bf Fix cast-away-const problem as well as bogus calculation of required buffer size. 2008-12-15 19:07:48 +00:00
3f7e1e4b91 Do not try to change a const variable. 2008-12-15 15:34:07 +00:00
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
192dd845a1 Using clause has to accept signed numeric constants too. 2008-12-12 12:14:43 +00:00
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
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
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
98be3b49be Fix typo in recent SSL unload patch.
Kris Jurka
2008-12-04 02:52:31 +00:00
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
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
ac03efbb9c Removed port testing. 2008-12-01 11:37:37 +00:00
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
2a6108ac24 Partial fix for fallout from temp-port changes. ecpg still needs more work,
but I think this is enough to turn the buildfarm green again.
2008-11-28 23:47:51 +00:00
df559de9c1 interval.c needs limits.h 2008-11-26 16:47:08 +00:00
7c5a561f31 Applied patch by Ron Mayer <rm_pg@cheapcomplexdevices.com> to merge the new
interval style into ecpg.
2008-11-26 16:31:02 +00:00
cbb3e1cda7 Tweak new PQExpBufferBroken macro to suppress warnings from pickier
versions of gcc.
2008-11-26 16:23:11 +00:00
ba34215269 Removed strchrnul 2008-11-26 15:35:30 +00:00
c4a13c7e3c When creating a varchar struct name braces must be discarded. 2008-11-26 13:18:22 +00:00
a53536d031 Add %expect 0 to all parser input files to prevent conflicts slipping by. 2008-11-26 08:45:12 +00:00
739259d62e Adjust the behavior of the PQExpBuffer code to make it have well-defined
results (ie, an empty "broken" buffer) if memory overrun occurs anywhere
along the way to filling the buffer.  The previous coding would just silently
discard portions of the intended buffer contents, as exhibited in trouble
report from Sam Mason.  Also, tweak psql's main loop to correctly detect
and report such overruns.  There's probably much more that should be done
in this line, but this is a start.
2008-11-26 00:26:23 +00:00
1304f297a4 Remove PGINTERVALSTYLE from the set of special environment variables for
libpq.  As noted by Peter, adding this variable created a risk of unexpected
connection failures when talking to older server versions, and since it
doesn't do anything you can't do with PGOPTIONS, it doesn't seem really
necessary.  Removing it does occasion a few extra lines in pg_regress.c,
but saving a getenv() call per libpq connection attempt is perhaps worth
that anyway.
2008-11-25 19:30:42 +00:00
47ed197c37 Disable FNM_CASEFOLD. Need a proper solution later, but just comment
it out for now so the buildfarm recovers.
2008-11-24 19:19:46 +00:00
cb10467d30 Add support for matching wildcard server certificates to the new SSL code.
This uses the function fnmatch() which is not available on all platforms
(notably Windows), so import the implementation from NetBSD into src/port.
2008-11-24 09:15:16 +00:00
30f272a79b Add missing dependencies to preproc.y build rule 2008-11-15 22:20:55 +00:00
f30a1d0474 Add missing semicolon, per grip from Alex Hunsaker. 2008-11-15 22:18:05 +00:00
fbaa172d65 ecpg's preproc.y is now generated as needed, so remove from CVS. 2008-11-14 17:43:14 +00:00
1a0bbc296c Improve comment about when to clean generated files. 2008-11-14 17:18:20 +00:00
b78f9b496d Enable script to generate preproc.y in build process. 2008-11-14 17:11:40 +00:00
a76e98f021 Fixed test for output_filename == stdout. 2008-11-14 16:25:34 +00:00
e339ed5f50 Added files containing changes between gram.y and preproc.y. 2008-11-14 10:03:33 +00:00
4607c5ca56 Adding script that generates preproc.y from gram.y to CVS. 2008-11-14 10:01:04 +00:00
53f93cbb20 Updated parser file to the one generated by the latest version of parse.[awk|pl] from the latest version of gram.y
Some small corrections to test suite.
2008-11-13 11:54:39 +00:00
c89404edf3 Fix libpq certificate validation for SSL connections.
Add config parameter "sslverify" to control the verification. Default
is to do full verification.

Clean up some old SSL code that never really worked.
2008-11-13 09:45:25 +00:00
c7f5c7c128 Replaced manually synced preproc.y by the one created by the new script.
Adapted regression test files accordingly.
2008-11-11 11:41:24 +00:00
df7641e25a Add a new GUC variable called "IntervalStyle" that decouples interval output
from DateStyle, and create a new interval style that produces output matching
the SQL standard (at least for interval values that fall within the standard's
restrictions).  IntervalStyle is also used to resolve the conflict between the
standard and traditional Postgres rules for interpreting negative interval
input.

Ron Mayer
2008-11-09 00:28:35 +00:00
5e75a5dca9 Fix incorrect comment in SSL code 2008-11-03 14:18:57 +00:00
492059daba Move from strcmp to strncmp to be more tolerant for changes to the parser. 2008-11-01 19:53:35 +00:00
ef9ed9b6aa Use string component in index structure. 2008-11-01 12:42:14 +00:00
e6c7f7c1ad Do not eat memory even in case of an out-of-memory error. 2008-11-01 08:55:21 +00:00
06735e3256 Unicode escapes in strings and identifiers 2008-10-29 08:04:54 +00:00
8ecd535169 Add WITH [NO] DATA clause to CREATE TABLE AS, per SQL.
Also, since WITH is now a reserved word, simplify the token merging code to
only deal with WITH_TIME.

by Tom Lane and myself
2008-10-28 14:09:45 +00:00
53a5026b5c Remove support for (insecure) crypt authentication.
This breaks compatibility with pre-7.2 versions.
2008-10-28 12:10:44 +00:00
f3a0688ace Add support for multiple error messages from libpq, by simply appending them
after each other (since we already add a newline on each, this makes them
multiline).

Previously a new error would just overwrite the old one, so for example any
error caused when trying to connect with SSL enabled would be overwritten
by the error message form the non-SSL connection when using sslmode=prefer.
2008-10-27 09:42:31 +00:00
0fec77ae88 SQL:2008 syntax CURRENT_CATALOG, CURRENT_SCHEMA, SET CATALOG, SET SCHEMA. 2008-10-27 09:37:47 +00:00
b1eeeb20d9 Update standalong libpq makefiles for msvc and bcc to work with the new
libpq events code.

Hiroshi Saito
2008-10-27 09:10:04 +00:00
bb8c822dbf Remove notes from the frontend SSL source that are incorrect or
end-user documentation that lives in the actual documentation.
2008-10-24 12:29:11 +00:00
501e58ba4e Fix memory leak when using gsslib parameter in libpq connections 2008-10-23 16:17:19 +00:00
831abae506 Clean regression.out 2008-10-21 10:51:24 +00:00
1471e3843d Allow SQL:2008 syntax ALTER TABLE ... ALTER COLUMN ... SET DATA TYPE
alongside our traditional syntax.
2008-10-21 08:38:16 +00:00