Commit Graph

702 Commits

Author SHA1 Message Date
Peter Eisentraut 8dd2ede3f8 Improve compiler string shown in version()
With some compilers such as Clang and ICC emulating GCC, using a
version string of the form "GCC $version" can be quite misleading.
Also, a great while ago, the version output from gcc --version started
including the string "gcc", so it is redundant to repeat that.  In
order to support ancient GCC versions, we now prefix the result with
"GCC " only if the version output does not start with a letter.
2011-05-06 23:01:50 +03:00
Tom Lane 993c5e5904 Tag 9.1beta1. 2011-04-27 17:17:22 -04:00
Tom Lane 2ab0796d7a Fix char2wchar/wchar2char to support collations properly.
These functions should take a pg_locale_t, not a collation OID, and should
call mbstowcs_l/wcstombs_l where available.  Where those functions are not
available, temporarily select the correct locale with uselocale().

This change removes the bogus assumption that all locales selectable in
a given database have the same wide-character conversion method; in
particular, the collate.linux.utf8 regression test now passes with
LC_CTYPE=C, so long as the database encoding is UTF8.

I decided to move the char2wchar/wchar2char functions out of mbutils.c and
into pg_locale.c, because they work on wchar_t not pg_wchar_t and thus
don't really belong with the mbutils.c functions.  Keeping them where they
were would have required importing pg_locale_t into pg_wchar.h somehow,
which did not seem like a good plan.
2011-04-23 12:35:41 -04:00
Peter Eisentraut 6094c242d1 Support for DragonFly BSD
Mapped to NetBSD, the closest existing match.  (Even though DragonFly
BSD is derived from FreeBSD, the shared library version numbering
matches NetBSD, and the rest is mostly the same among all BSD
variants.)

per "Rumko"
2011-03-02 21:15:28 +02:00
Andrew Dunstan 42e5223648 Add a configure check for Python.h if building with python. 2011-02-26 14:17:57 -05:00
Peter Eisentraut f005384532 Better support for thread-support flag detection with clang
When testing the stderr produced by various thread-support flags, also
run a compilation in addition to a link, because clang warns on
certain flags when compiling but not when linking.
2011-02-16 23:15:54 +02:00
Peter Eisentraut 414c5a2ea6 Per-column collation support
This adds collation support for columns and domains, a COLLATE clause
to override it per expression, and B-tree index support.

Peter Eisentraut
reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
2011-02-08 23:04:18 +02:00
Andrew Dunstan 91812df4ed Enable building with the Mingw64 compiler.
This can be used to build 64 bit Windows binaries, not only on 64 bit
Windows but on supported cross-compiling hosts including 32 bit Windows,
Cygwin, Darwin and Linux.
2011-01-30 19:56:46 -05:00
Peter Eisentraut 8b6f5f2510 Use -Wformat-security when available 2011-01-27 01:23:48 +02:00
Peter Eisentraut 6fe5e4e63e autoreconf
Synchronize pg_config.h.in with configure.in (someone must have
forgotten to run autoheader or autoreconf), and clean up some spurious
change in configure introduced by the last commit there.
2011-01-27 01:19:45 +02:00
Robert Haas 968bc6fac9 sepgsql, an SE-Linux integration for PostgreSQL
This is still pretty rough - among other things, the documentation
needs work, and the messages need a visit from the style police -
but this gets the basic framework in place.

KaiGai Kohei
2011-01-23 20:48:27 -05:00
Bruce Momjian 5d950e3b0c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Andrew Dunstan a534728afb Only build in crashdump support on Windows if there's a working dbghelp.h. 2010-12-26 10:34:47 -05:00
Tom Lane 5cdd65f324 Fix up getopt() reset management so it works on recent mingw.
The mingw people don't appear to care about compatibility with non-GNU
versions of getopt, so force use of our own copy of getopt on Windows.
Also, ensure that we make use of optreset when using our own copy.

Per report from Andrew Dunstan.  Back-patch to all versions supported
on Windows.
2010-12-15 23:50:41 -05:00
Peter Eisentraut 804a786c95 Add/fix caching on some configure checks 2010-09-29 22:38:04 +03:00
Tom Lane 651377933e Fix remaining stray references to CVS.
These are just cosmetic and don't seem worth back-patching far.
I put them into 9.0 just because it was trivial to do so.
2010-09-22 19:51:39 -04:00
Heikki Linnakangas 2746e5f21d Introduce latches. A latch is a boolean variable, with the capability to
wait until it is set. Latches can be used to reliably wait until a signal
arrives, which is hard otherwise because signals don't interrupt select()
on some platforms, and even when they do, there's race conditions.

On Unix, latches use the so called self-pipe trick under the covers to
implement the sleep until the latch is set, without race conditions. On
Windows, Windows events are used.

Use the new latch abstraction to sleep in walsender, so that as soon as
a transaction finishes, walsender is woken up to immediately send the WAL
to the standby. This reduces the latency between master and standby, which
is good.

Preliminary work by Fujii Masao. The latch implementation is by me, with
helpful comments from many people.
2010-09-11 15:48:04 +00:00
Tom Lane b40466c337 Stamp HEAD as 9.1devel.
(And there was much rejoicing.)
2010-07-09 04:10:58 +00:00
Marc G. Fournier 1084f31770 tag beta3 2010-07-09 02:43:12 +00:00
Tom Lane 291a957745 Split the LDFLAGS make variable into two parts: LDFLAGS is now used for
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-07-05 18:54:38 +00:00
Marc G. Fournier dcd52a64bd tag 9.0beta2 2010-06-04 07:28:30 +00:00
Michael Meskes 29259531c7 Replace self written 'long long int' configure test by standard 'AC_TYPE_LONG_LONG_INT' macro call. 2010-05-25 17:28:20 +00:00
Michael Meskes 555a02f910 Added a configure test for "long long" datatypes. So far this is only used in ecpg and replaces the old test that was kind of hackish. 2010-05-25 14:32:55 +00:00
Tom Lane 382ff21203 Fix up lame idea of not using autoconf to determine if platform has scandir().
Should fix buildfarm failures.
2010-05-13 22:07:43 +00:00
Marc G. Fournier f9d9b2b34a tag for 9.0beta1 2010-04-30 03:16:58 +00:00
Peter Eisentraut 7e8a60b7c5 Don't link PL/Python against LOCALMODLIBS
This variable is apparently only for Python internally.  In newer releases
of Python this variable pulls in more and more libraries that users are
less likely to have, leading to potential build failures.
2010-03-17 22:02:44 +00:00
Tom Lane dc43e2f540 Fix configure's regexp for extracting the Perl version number from perl -v
output.  Per bug #5339, Perl 5.11 has changed the format of that output
enough to break the previous coding.

Alex Hunsaker
2010-02-23 18:35:07 +00:00
Bruce Momjian b4689bfb00 Revert configure warning to use "official distribution". 2010-02-22 21:16:50 +00:00
Bruce Momjian 6a0b6421e2 Use the term "bundled distribution" instead of "official distribution" in
configure warnings.
2010-02-22 18:02:06 +00:00
Peter Eisentraut 2f6cf9192c Revert version stamping in wrong branch 2010-02-19 18:42:30 +00:00
Peter Eisentraut a779afb40c Version stamp 9.0alpha4 2010-02-19 16:03:22 +00:00
Tom Lane 50a90fac40 Stamp HEAD as 9.0devel, and update various places that were referring to 8.5
(hope I got 'em all).  Per discussion, this release will be 9.0 not 8.5.
2010-02-17 04:19:41 +00:00
Tom Lane e08ab7c312 Support inlining various small performance-critical functions on non-GCC
compilers, by applying a configure check to see if the compiler will accept
an unreferenced "static inline foo ..." function without warnings.  It is
believed that such warnings are the only reason not to declare inlined
functions in headers, if the compiler understands "inline" at all.

Kurt Harriman
2010-02-13 02:34:16 +00:00
Tom Lane a6c75be23d Re-order configure tests to reflect the fact that the code generated for
posix_fadvise and other file-related functions can depend on _LARGEFILE_SOURCE
and/or _FILE_OFFSET_BITS.  Per report from Robert Treat.

Back-patch to 8.4.  This has been wrong all along, but we weren't really using
posix_fadvise in anger before, and AC_FUNC_FSEEKO seems to mask the issue well
enough for that function.
2010-01-16 19:50:26 +00:00
Tom Lane c7f08913ba Fail in a nicer way if we have --with-perl and no Perl. 2010-01-07 03:24:57 +00:00
Tom Lane 55233c3382 Make configure check the version of Perl we're building with, and reject
versions < 5.8.  Also, if there's no Perl, emit a warning informing the
user that he won't be able to build from a CVS pull.  This is exactly the
same treatment we give Bison and Perl, and for the same reasons.
2010-01-07 01:41:11 +00:00
Tom Lane d15cb38dec Alter the configure script to fail immediately if the C compiler does not
provide a working 64-bit integer datatype.  As recently noted, we've been
broken on such platforms since early in the 8.4 development cycle.  Since
it took nearly two years for anyone to even notice, it seems that the
rationale for continuing to support such platforms has reached the point
of non-existence.  Rather than thrashing around to try to make it work
again, we'll just admit up front that this no longer works.

Back-patch to 8.4 since that branch is also broken.

We should go around to remove INT64_IS_BUSTED support, but just in HEAD,
so that seems like material for a separate commit.
2010-01-07 00:25:05 +00:00
Bruce Momjian 0239800893 Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
Tom Lane 85d02a6586 Redefine Datum as uintptr_t, instead of unsigned long.
This is more in keeping with modern practice, and is a first step towards
porting to Win64 (which has sizeof(pointer) > sizeof(long)).

Tsutomu Yamada, Magnus Hagander, Tom Lane
2009-12-31 19:41:37 +00:00
Peter Eisentraut dd4cd55c15 Python 3 support in PL/Python
Behaves more or less unchanged compared to Python 2, but the new language
variant is called plpython3u.  Documentation describing the naming scheme
is included.
2009-12-15 22:59:55 +00:00
Bruce Momjian 64579962bb Properly define ENABLE_THREAD_SAFETY in conflgure, per suggestion from Peter. 2009-12-11 02:21:21 +00:00
Bruce Momjian 8c1c2e38f6 thread-safety
Apply full patch to enable thread-safety by default, e.g. doc changes.
2009-12-02 14:07:26 +00:00
Bruce Momjian 925b32bba1 Enable thread safety
Enable thread safety on all platforms.  This will either be followed up
by a more extensive patch, or reverted, depending on the build farm
results.
2009-12-01 23:02:44 +00:00
Bruce Momjian 891f924bad THREAD_SUPPORT
There is no reference to THREAD_SUPPORT outside configure, and it is
never set, so remove it.
2009-11-30 16:50:38 +00:00
Peter Eisentraut de7ee9e2e9 In the configure check for the Python distutils module, use a less obscure
shell construct to hide away the stderr output.  Python 3.1 actually core
dumps on the current invocation (http://bugs.python.org/issue7111), but the
new version also has the more general advantage of saving the error message
in config.log for analysis.
2009-10-14 21:59:15 +00:00
Tom Lane f3aec2c7f5 Support "samehost" and "samenet" specifications in pg_hba.conf,
by enumerating the machine's IP interfaces to look for a match.

Stef Walter
2009-10-01 01:58:58 +00:00
Tom Lane e97281c46c Write psql's ~/.psql_history file using history_truncate_file() and
append_history(), if libreadline is new enough to have those functions
(they seem to be present at least since 4.2; but libedit may not have them).
This gives significantly saner behavior when two or more sessions overlap in
their use of the history file; although having two sessions exit at just the
same time is still perilous to your history.  The behavior of \s remains
unchanged, ie, overwrite whatever was there.
Per bug #5052 from Marek Wójtowicz.
2009-09-13 22:18:22 +00:00
Tom Lane d69a419e68 Remove any -arch switches given in ExtUtils::Embed's ldopts from our
perl_embed_ldflags setting.  On OS X it seems that ExtUtils::Embed is
trying to force a universal binary to be built, but you need to specify
that a lot further upstream if you want Postgres built that way; the only
result of including -arch in perl_embed_ldflags is some warnings at the
plperl.so link step.  Per my complaint and Jan Otto's suggestion.
2009-09-08 18:15:55 +00:00
Tom Lane 59b9f3d36d Replace use of the long-deprecated Bonjour API DNSServiceRegistrationCreate
with the not-so-deprecated DNSServiceRegister.  This patch shouldn't change
any user-visible behavior, it just gets rid of a deprecation warning in
--with-bonjour builds.  The new code will fail on OS X releases before 10.3,
but it seems unlikely that anyone will want to run Postgres 8.5 on 10.2.
2009-09-08 16:08:26 +00:00
Peter Eisentraut 9d182ef002 Update of install-sh, mkinstalldirs, and associated configury
Update install-sh to that from Autoconf 2.63, plus our Darwin-specific
changes (which I simplified a bit).  install-sh is now able to install
multiple files in one run, so we could simplify our makefiles sometime.

install-sh also now has a -d option to create directories, so we don't need
mkinstalldirs anymore.

Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available
instead of install-sh -d.  For consistency with the rest of the world,
the corresponding make variable has been renamed from $(mkinstalldirs) to
$(MKDIR_P).
2009-08-26 22:24:44 +00:00