Commit Graph

161 Commits

Author SHA1 Message Date
Bruce Momjian edc999b09a Make NEED_REENTRANT_FUNC_NAMES _require_ *_r functions, and add tests to
configure to report if they are not found.
2003-08-16 15:35:51 +00:00
Tom Lane cae912d05b Do not link in libwsock32 on non-win32 platforms. Improve grammar
of thread-safety comments.
2003-08-11 18:07:38 +00:00
Tom Lane 33ab177a56 Don't assume that struct option is available just because we can find a
getopt_long().  This is more or less the same problem as we saw earlier
with getaddrinfo() and struct addrinfo, and for the same reason: random
user-added libraries might contain the subroutine, but there's no
guarantee we will find the matching header files.
2003-08-07 21:11:58 +00:00
Bruce Momjian 98bf004421 Re-add USE_THREADS, used by ecpg. 2003-08-04 21:26:26 +00:00
Bruce Momjian 5c15cb4752 Fix thread handling in configure. 2003-08-04 16:48:03 +00:00
Tom Lane 4c3c8c048d Remove --enable-recode feature, since it's been broken by IPv6 changes,
and seems to have too few users to justify maintaining.
2003-08-04 04:03:10 +00:00
Tom Lane df63503dc2 Have a go at fixing various outstanding portability issues in code that
was modified for IPv6.  Use a robust definition of struct sockaddr_storage,
do a proper configure test to see if ss_len exists, don't assume that
getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to
return the protocol we ask for, etc.  This incorporates several outstanding
patches from Kurt Roeckx, but I'm to blame for anything that doesn't
work ...
2003-07-23 23:30:41 +00:00
Bruce Momjian 99308891ef Remove references to sa_family_t, except when SOCKADDR_STORAGE requires
it.

Also handle __ss_family as a synonym for ss_family.

Kurt Roeckx
2003-06-23 23:52:00 +00:00
Bruce Momjian 228c02c3e5 Run autoconf/autoheader for ecpg change. 2003-06-15 04:09:18 +00:00
Bruce Momjian 62b532b736 Add thread.c for libpq threading, and hook it into libpq/configure. 2003-06-14 14:35:42 +00:00
Bruce Momjian 02d847fe9f Add --with-threads configure option to control threaded libpq. 2003-06-13 23:10:08 +00:00
Bruce Momjian b4cea00a1f IPv6 cleanups.
Kurt Roeckx
Andrew Dunstan
2003-06-12 07:36:51 +00:00
Bruce Momjian 65fb311a97 Add Rendezvous support to postmaster, from Chris Campbell 2003-06-11 06:56:07 +00:00
Bruce Momjian 24daeb8e73 Add configure thread tests. 2003-05-27 16:36:50 +00:00
Tom Lane c120f4ba0a Adjust configure so that extern tzname[] will be checked for
independently of whether the struct tm tm_zone member exists.
Also run autoheader, which seems not to have been done lately;
it added about three more things to pg_config.h.in than I was expecting...
2003-05-22 16:39:30 +00:00
Bruce Momjian 07d35e4277 Change alternate database location patch to test for symlink() rather
than WIN32.
2003-05-07 03:47:08 +00:00
Tom Lane f690920a75 Infrastructure for upgraded error reporting mechanism. elog.c is
rewritten and the protocol is changed, but most elog calls are still
elog calls.  Also, we need to contemplate mechanisms for controlling
all this functionality --- eg, how much stuff should appear in the
postmaster log?  And what API should libpq expose for it?
2003-04-24 21:16:45 +00:00
Peter Eisentraut cb1d036acb Generate pg_config.h.in by autoheader. Separate out manually editable
parts.  Standardize spelling of comments in pg_config.h.
2003-04-06 22:45:23 +00:00
Tom Lane 1da6eb7fda Whack getaddrinfo() patch around until it works, more or less, on
machines without IPv6.  Or at least it works on HPUX 10.20 ...
2003-04-02 00:49:28 +00:00
Peter Eisentraut 82a91eb54e Simplify the socket handling code by supplying a replacement getaddrinfo()
function if the OS doesn't provide one.
2003-03-29 11:31:52 +00:00
Tom Lane 1d57374114 Use poll(2) in preference to select(2), if available. This solves
problems in applications that may have a large number of files open,
such that libpq's socket number exceeds the range supported by fd_set.
From Chris Brown.
2003-03-06 03:16:55 +00:00
Bruce Momjian adc3b34b9c Here's the patch I promised over on HACKERS - it alters the
implementation
of '\e' history tracking for systems that have a readline compatability
library without replace_history_entry.  I fall back to pushing the query
onto the history stack after the \e, rather than replacing it.

The patch adds one more place to look for readline headers, and a test
for replace_history_entry. I've only included the patch for configure.in

Ross J. Reedstrom
2003-02-19 04:04:04 +00:00
Bruce Momjian 0e010a54a3 Update FAQ's in head and 7.3.X. 2003-02-14 14:05:00 +00:00
Tom Lane 15ab7a8720 Where available, use utime() or utimes() to update the file mod time
of the socket file and socket lock file; this should prevent both of them
from being removed by even the stupidest varieties of /tmp-cleaning
script.  Per suggestion from Giles Lean.
2003-01-25 05:19:47 +00:00
Bruce Momjian 6b39507498 Update comments on IPv6 #define. 2003-01-06 06:07:20 +00:00
Bruce Momjian 895f954f24 Update ipv6 comment, move configure test to the right place 2003-01-06 05:46:18 +00:00
Bruce Momjian c3e9699f21 Enable IPv6 connections to the server, and add pg_hba.conf IPv6 entries
if the OS supports it.  Code will still compile on non-IPv6-aware
machines (feature added by Bruce).

Nigel Kukard
2003-01-06 03:18:27 +00:00
Bruce Momjian 7aeab94adf This trivial patch removes 2 unused defines from pg_config.h.in:
FASTBUILD and DATEDEBUG weren't referenced by any other code.

Neil Conway
2002-11-10 00:38:21 +00:00
Tom Lane b02d3aaed7 Move substitute extern declarations to end of file, so that they are
not read until after we've read the port-specific header file.  In
particular this should make it safer to #include system headers for
inet_aton; in general it seems that the port header file ought to be
in a position to set definitions before we do stuff based on having
a definition or not.
2002-11-07 22:08:30 +00:00
Tom Lane 52c9d25933 Be careful to include postgres.h *before* any system headers, to ensure
that the right flavors of largefile-related definitions are seen.
Most of these changes are probably unnecessary, but better safe than
sorry.
2002-09-05 00:43:07 +00:00
Peter Eisentraut e43ecb3d1a Remove leftovers from subproject removals. Fixes for Python and Kerberos
configuration.
2002-09-04 22:54:18 +00:00
Tom Lane c7a165adc6 Code review for HeapTupleHeader changes. Add version number to page headers
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
per earlier discussion.  Simplify scheme for overlaying fields in tuple
header (no need for cmax to live in more than one place).  Don't try to
clear infomask status bits in tqual.c --- not safe to do it there.  Don't
try to force output table of a SELECT INTO to have OIDs, either.  Get rid
of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
has already caused one recent failure.  Improve documentation.
2002-09-02 01:05:06 +00:00
Tatsuo Ishii 0308d66a6a Remove MULTIBYTE 2002-08-29 08:03:22 +00:00
Peter Eisentraut 6faf8024fa Enable large file support.
Use off_t and size_t in pg_dump to handle file offset arithmetic correctly.
2002-08-20 17:54:45 +00:00
Bruce Momjian 46bb23ac01 Change NAMEDATALEN to 64, INDEX_MAX_KEYS/MAX_FUNC_ARGS to 32, per discussion on hackers. 2002-08-13 20:40:44 +00:00
Tom Lane ce7565ab91 Instead of having a configure-time DEFAULT_ATTSTATTARGET, store -1 in
attstattarget to indicate 'use the default'.  The default is now a GUC
variable default_statistics_target, and so may be changed on the fly.  Along
the way we gain the ability to have pg_dump dump the per-column statistics
target when it's not the default.  Patch by Neil Conway, with some kibitzing
from Tom Lane.
2002-07-31 17:19:54 +00:00
Bruce Momjian b0f5086e41 oid is needed, it is added at the end of the struct (after the null
bitmap, if present).

Per Tom Lane's suggestion the information whether a tuple has an oid
or not is carried in the tuple descriptor.  For debugging reasons
tdhasoid is of type char, not bool.  There are predefined values for
WITHOID, WITHOUTOID and UNDEFOID.

This patch has been generated against a cvs snapshot from last week
and I don't expect it to apply cleanly to current sources.  While I
post it here for public review, I'm working on a new version against a
current snapshot.  (There's been heavy activity recently; hope to
catch up some day ...)

This is a long patch;  if it is too hard to swallow, I can provide it
in smaller pieces:

Part 1:  Accessor macros
Part 2:  tdhasoid in TupDesc
Part 3:  Regression test
Part 4:  Parameter withoid to heap_addheader
Part 5:  Eliminate t_oid from HeapTupleHeader

Part 2 is the most hairy part because of changes in the executor and
even in the parser;  the other parts are straightforward.

Up to part 4 the patched postmaster stays binary compatible to
databases created with an unpatched version.  Part 5 is small (100
lines) and finally breaks compatibility.

Manfred Koizar
2002-07-20 05:16:59 +00:00
Tom Lane 72a3902a66 Create an internal semaphore API that is not tied to SysV semaphores.
As proof of concept, provide an alternate implementation based on POSIX
semaphores.  Also push the SysV shared-memory implementation into a
separate file so that it can be replaced conveniently.
2002-05-05 00:03:29 +00:00
Thomas G. Lockhart 547df0cc85 Support alternate storage scheme of 64-bit integer for date/time types.
Use "--enable-integer-datetimes" in configuration to use this rather
 than the original float8 storage. I would recommend the integer-based
 storage for any platform on which it is available. We perhaps should
 make this the default for the production release.
Change timezone(timestamptz) results to return timestamp rather than
 a character string. Formerly, we didn't have a way to represent
 timestamps with an explicit time zone other than freezing the info into
 a string. Now, we can reasonably omit the explicit time zone from the
 result and return a timestamp with values appropriate for the specified
 time zone. Much cleaner, and if you need the time zone in the result
 you can put it into a character string pretty easily anyway.
Allow fractional seconds in date/time types even for dates prior to 1BC.
Limit timestamp data types to 6 decimal places of precision. Just right
 for a micro-second storage of int8 date/time types, and reduces the
 number of places ad-hoc rounding was occuring for the float8-based types.
Use lookup tables for precision/rounding calculations for timestamp and
 interval types.  Formerly used pow() to calculate the desired value but
 with a more limited range there is no reason to not type in a lookup
 table. Should be *much* better performance, though formerly there were
 some optimizations to help minimize the number of times pow() was called.
Define a HAVE_INT64_TIMESTAMP variable. Based on the configure option
 "--enable-integer-datetimes" and the existing internal INT64_IS_BUSTED.
Add explicit date/interval operators and functions for addition and
 subtraction. Formerly relied on implicit type promotion from date to
 timestamp with time zone.
Change timezone conversion functions for the timetz type from "timetz()"
 to "timezone()". This is consistant with other time zone coersion
 functions for other types.
Bump the catalog version to 200204201.
Fix up regression tests to reflect changes in fractional seconds
 representation for date/times in BC eras.
All regression tests pass on my Linux box.
2002-04-21 19:52:18 +00:00
Tatsuo Ishii ad201b8d18 Remove --enable-syslog option 2002-04-21 00:22:52 +00:00
Peter Eisentraut 5c1f31d2d4 Readline and Zlib now required by default. Add options --without-readline
and --without-zlib to turn them off.
2002-04-10 22:47:09 +00:00
Peter Eisentraut 867901db9e Locale support is on by default. The choice of locale is done in initdb
and/or with GUC variables.
2002-04-03 05:39:33 +00:00
Peter Eisentraut 7c1ff35410 Upgrade to Autoconf version 2.53. Replaced many custom macro
calls with new or now-built-in versions.  Make sure that all
calls to AC_DEFINE have a third argument, for possible use of
autoheader in the future.
2002-03-29 17:32:55 +00:00
Tom Lane f70a7e3832 Add note that BLCKSZ must be a power of 2. 2002-02-25 17:11:22 +00:00
Peter Eisentraut 42c3381fc7 Heimdal support (Kerberos V implementation from KTH) 2002-02-23 04:17:47 +00:00
Tom Lane 04c8d4c660 libpq++/pgconnection.h must not include postgres_fe.h, else it fails to
compile in client apps that use the standard installed header set.
To allow removing that include, move DLLIMPORT definitions out of c.h
and into the appropriate port-specific header files.
2002-01-22 19:02:40 +00:00
Tom Lane 18ab41eeef Add configure-time check whether sig_atomic_t is defined; if not,
provide a default definition equating it to 'int'.  Should trigger only
on machines with pre-ANSI-C header files, eg SunOS 4.1.x.
2001-12-03 17:44:52 +00:00
Peter Eisentraut 15abc7788e More correct way to check for existence of types, which allows to specify
which include files to consider.  Should fix BeOS problems with int8 types.
2001-12-02 11:38:40 +00:00
Bruce Momjian ea436f9fcf Well the absolute correct solution would involve all of:
int8, int16, int32, int64 and separately uint8, uint16, uint32, uint64

The previous patch grouped:
int8, int16 and int32
uint8, uint16 and uint32
int64 and uint64  <-- this grouping is wrong on AIX 4.3.3 and below

If you prefer to make 4 groups out of this you could apply this patch.

Andreas
2001-11-15 16:35:19 +00:00
Bruce Momjian 6c9b11b35e Fix for AIX compile and unsigned/signed typedefs.
Peter E, Tatsuo, Andreas
2001-11-15 16:09:34 +00:00
Tom Lane 2b7206a993 Revert change to autodetect '__getopt_initialized' variable ... turns
out glibc doesn't actually export this variable, so we need a different
solution.
2001-10-20 17:57:39 +00:00
Tom Lane 379268aa62 Proper fix for glibc getopt() botch. Surprising we did not see this
before.
2001-10-19 20:47:09 +00:00
Bruce Momjian 1d3a47af0c Attached patch for unconditional enabling of pltcl-unknown support.
Enabling this feature adds very light overhead of 1 select from pg_class on
first using of pl/tcl in backend if unknown suppport is really unused.
But pl/tcl with this support has very improved functionality.

Patch includes changes to documentation.
2001-10-13 04:23:50 +00:00
Bruce Momjian 034895125d > > > > > - PostgreSQL requires to be compiled with --enable-multibyte
> > > > >   and --enable-unicode-convertion if it ought to work correctly
> > > > >   with Tcl/Tk >= 8.1 (client or server side).
> > > > >
> > > > > - PL/Tcl needs to be changed to use pg_do_encoding_conversion
> > > > >   if it runs on a Tcl version >= 8.1 .
> > >
> > > > I'll do pl/tcl part in the next version of patch. Using this approach we
> > > > can eliminate overhead for databases in UNICODE.
> > >
> > > Any progress on this?  I'd prefer to get rid of this --enable-pltcl-utf
> > > option before release.
> >
> > Done
> >
> > Next version removes --enable-pltcl-utf switch and enables embedded
> > utf conversion of pgsql if tcl version >=8.1 and --enable-unicode-conversion
2001-10-01 15:33:31 +00:00
Peter Eisentraut 364a7ebe26 Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager.  In particular,
use the include files provided by the driver manager over our own,
and use the odbcinst library of the driver manager rather than gpps.c.

Migrate portability sections common to several files into psqlodbc.h.
2001-09-22 22:54:33 +00:00
Tatsuo Ishii 2374be8a26 Remove --enable-unicode-conversion
unicode-conversion is always on if --enable-multibyte is specified

	   Tatsuo Ishii
2001-09-14 10:36:52 +00:00
Bruce Momjian a7621c92ae Update SCM_CREDS for Net/Free/BSD-OS. Add configure checks. 2001-09-07 19:52:54 +00:00
Tom Lane 863aceb54f Get rid of PID entries in shmem hash table; there is no longer any need
for them, and making them just wastes time during backend startup/shutdown.
Also, remove compile-time MAXBACKENDS limit per long-ago proposal.
You can now set MaxBackends as high as your kernel can stand without
any reconfiguration/recompilation.
2001-09-07 00:27:30 +00:00
Bruce Momjian 04c1f72920 PAM authentication:
> pam_strerror() should be used a few more times, rather than just saying
> "Error!".  Also, the configure.in snippet seems wrong.  You add
> -I$pam_prefix/include/security to $INCLUDES and then you #include
> <security/pam_appl.h>.  This whole thing is probably unnecessary, since
> PAM is a system library on the systems where it exists, so the headers
> and libraries are found automatically, unlike OpenSSL and
> Kerberos.

See attached revised patch. (I'm sure the configure.in stuff can be done
right/better, I'm just not enough of a autoconf guru to know what to
change it to.)

Dominic J. Eidson
2001-09-06 03:23:38 +00:00
Bruce Momjian 16910e44de Next version of patch.
Now with documentation update and disabling of UTF conversion for Tcl <=8.0

On Fri, 24 Aug 2001, Vsevolod Lobko wrote:

> On Thu, 23 Aug 2001, Tom Lane wrote:
>
> > > Is this looks better?
> >
> > It does, but one small gripe: the lack of semicolons will probably cause
> > pg_indent to mess up the indentation.  (I know emacs' autoindent mode
> > will not work nicely with it, either.)  Please set up the macros so that
> > you write
> >
> >                         UTF_BEGIN;
> >                         Tcl_DStringAppend(&unknown_src, UTF_E2U(part), -1);
> >                         UTF_END;
> >
> > and then I'll be happy.
>
> Attached revised patch
>
> > Your point about overhead is a good one, so I retract the gripe about
> > using a configure switch.  But please include documentation patches to
> > describe the configure option in the administrator's guide (installation
> > section).
>
> This patch still uses configure switch for enabling feature.
>
> For enabling based on tcl version we have 2 posibilites:
>  1) having feature enabled by default, but in pltcl.c check for tcl
>     version and disable it for old versions
>  2) enable or disable at configure time based on tcl version, but there
>     are problem - current configure don't checks for tcl version at all
>     and my configure skills not enought for adding this
>

Vsevolod Lobko
2001-09-06 02:56:32 +00:00
Peter Eisentraut 968d7733a1 Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number of
places that were including the wrong files.
2001-08-24 14:07:50 +00:00