summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-07-16Add support for dividing money by money (yielding a float8 result) and forTom Lane
casting between money and numeric. Andy Balholm, reviewed by Kevin Grittner
2010-07-16Remove a sanity check in the exclusion-constraint code that prevented usersTom Lane
from defining non-self-conflicting constraints. Jeff Davis Note: I (tgl) objected to removing this check in 9.0 on the grounds that it was an important sanity check in new, poorly tested code. However, it should be all right to remove it for 9.1, since we'll get field testing from the 9.0 branch.
2010-07-16Remove duplicate code in DefineOpFamily().Tom Lane
The code was probably meant to be this way all along, since the subroutine CreateOpFamily previously had only one caller. But it wasn't. KaiGai Kohei
2010-07-14Fix several problems in pg_dump's handling of SQL/MED objects, notably failureTom Lane
to dump a PUBLIC user mapping correctly, as per bug #5560 from Shigeru Hanada. Use the pg_user_mappings view rather than trying to access pg_user_mapping directly, so that the code doesn't fail when run by a non-superuser. And clean up some minor carelessness such as unsafe usage of fmtId(). Back-patch to 8.4 where this code was added.
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-13Teach EXPLAIN to print PARAM_EXEC Params as the referenced expressions,Tom Lane
rather than just $N. This brings the display of nestloop-inner-indexscan plans back to where it's been, and incidentally improves the display of SubPlan parameters as well. In passing, simplify the EXPLAIN code by having it deal primarily in the PlanState tree rather than separately searching Plan and PlanState trees. This is noticeably cleaner for subplans, and about a wash elsewhere. One small difference from previous behavior is that EXPLAIN will no longer qualify local variable references in inner-indexscan plan nodes, since it no longer sees such nodes as possibly referencing multiple tables. Vars referenced through PARAM_EXEC Params are still forcibly qualified, though, so I don't think the display is any more confusing than before. Adjust a couple of examples in the documentation to match this behavior.
2010-07-13Print each test_fsync description while test is running, rather than atBruce Momjian
the end.
2010-07-13Oops, in the previous fix to prevent a cursor that's being used in a FORHeikki Linnakangas
loop from being dropped, I missed subtransaction cleanup. Pinned portals must be dropped at subtransaction cleanup just as they are at main transaction cleanup. Per bug #5556 by Robert Walker. Backpatch to 8.0, 7.4 didn't have subtransactions.
2010-07-12Make NestLoop plan nodes pass outer-relation variables into their innerTom Lane
relation using the general PARAM_EXEC executor parameter mechanism, rather than the ad-hoc kluge of passing the outer tuple down through ExecReScan. The previous method was hard to understand and could never be extended to handle parameters coming from multiple join levels. This patch doesn't change the set of possible plans nor have any significant performance effect, but it's necessary infrastructure for future generalization of the concept of an inner indexscan plan. ExecReScan's second parameter is now unused, so it's removed.
2010-07-12Document bump of minor library version numbers.Bruce Momjian
2010-07-12Bump minor library version numbers, for 9.1 release.Bruce Momjian
2010-07-09Avoid an Assert failure in deconstruct_array() by making get_attstatsslot()Tom Lane
use the actual element type of the array it's disassembling, rather than trusting the type OID passed in by its caller. This is needed because sometimes the planner passes in a type OID that's only binary-compatible with the target column's type, rather than being an exact match. Per an example from Bernd Helmle. Possibly we should refactor get_attstatsslot/free_attstatsslot to not expect the caller to supply type ID data at all, but for now I'll just do the minimum-change fix. Back-patch to 7.4. Bernd's test case only crashes back to 8.0, but since these subroutines are the same in 7.4, I suspect there may be variant cases that would crash 7.4 as well.
2010-07-09Fix ruleutils' get_variable() to print something useful for Vars referencingTom Lane
resjunk outputs of subquery tlists, instead of throwing an error. Per bug #5548 from Daniel Grace. We might at some point find we ought to back-patch this further than 9.0, but I think that such Vars can only occur as resjunk members of upper-level tlists, in which case the problem can't arise because prior versions didn't print resjunk tlist items in EXPLAIN VERBOSE.
2010-07-09Add a hook in ExecCheckRTPerms().Robert Haas
This hook allows a loadable module to gain control when table permissions are checked. It is expected to be used by an eventual SE-PostgreSQL implementation, but there are other possible applications as well. A sample contrib module can be found in the archives at: http://archives.postgresql.org/pgsql-hackers/2010-05/msg01095.php Robert Haas and Stephen Frost
2010-07-09Stamp HEAD as 9.1devel.Tom Lane
(And there was much rejoicing.)
2010-07-09tag beta3REL9_0_BETA3Marc G. Fournier
2010-07-08Translation updates for 9.0beta3Peter Eisentraut
2010-07-08Minor kibitzing on previous patch: no need to run check more than once.Tom Lane
(_PG_init should be called only once anyway, but as long as it's got an internal guard against repeat calls, that should be in front of the version check.)
2010-07-08Install safeguard against running PL/Python 2 and 3 in the same sessionPeter 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-08Update obsolete comment. Noted by Josh Tolley.Tom Lane
2010-07-08Fix variant float8 expected files to have exactly the expected spacing.Tom Lane
This wasn't important when we used diff's -w (--ignore-all-space) option to compare regression result files, but it is now. Per buildfarm member canary, which evidently has been offline since we did that in November, but came to life again today.
2010-07-08Add support for TCP keepalives on Windows, both for backend and the newMagnus Hagander
libpq support.
2010-07-08Fix "cannot handle unplanned sub-select" error that can occur when aTom Lane
sub-select contains a join alias reference that expands into an expression containing another sub-select. Per yesterday's report from Merlin Moncure and subsequent off-list investigation. Back-patch to 7.4. Older versions didn't attempt to flatten sub-selects in ways that would trigger this problem.
2010-07-07Adjust mbutils.c so it won't get broken by future pgindent runs.Tom Lane
To do that, replace L'\0' by (WCHAR) 0. Perhaps someday we should teach pgindent about wide-character literals, but so long as this is the only use-case in the entire Postgres sources, a workaround seems easier.
2010-07-06Make log_temp_files based on kB, and revert docs & comments to match.Robert Haas
Per extensive discussion on pgsql-hackers. We are deliberately not back-patching this even though the behavior of 8.3 and 8.4 is unquestionably broken, for fear of breaking existing users of this parameter. This incompatibility should be release-noted.
2010-07-06Accept slightly grotty coding in Makefile.global in order to keep the -LTom Lane
flag for src/port/ in front of any -L flags placed in LDFLAGS by configure. This undoes an L-flag-ordering change that I had thought would be safe, but seems to be making at least one buildfarm member fail --- the only theory for orca's failure that I can think of is that it's got an old copy of libpgport.a in /usr/lib. Also allow for LDFLAGS_SL to be set by contrib makefiles before they invoke Makefile.global.
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-06Undo pgindent breakage (again). Per buildfarm.Tom Lane
2010-07-06Mention why one C file fails pgindent.Bruce Momjian
2010-07-06pgindent run for 9.0, second runBruce Momjian
2010-07-06Update pgindent testing instructions.Bruce Momjian
2010-07-06Still more third thoughts: when linking shared libraries, LDFLAGS probablyTom Lane
needs to appear before anything placed in SHLIB_LINK. This is because SHLIB_LINK is typically a subset of LIBS, and LIBS has to appear after LDFLAGS on platforms that are sensitive to the relative order of -L and -l switches.
2010-07-06Allow for LDFLAGS_SL already having a value in Makefile.aix.Tom Lane
Per buildfarm results.
2010-07-05Dept. of third thoughts: PG_LIBS may contain a -L switch, so it had betterTom Lane
stay in front of LDFLAGS.
2010-07-05Make sure LDFLAGS come before LIBS when linking contrib programs.Tom Lane
Solaris, at least, seems to be sensitive to the relative order of -L and -l switches, so this is needed. Per buildfarm results.
2010-07-05Fix a few single-file (MODULES, not MODULE_big) contrib makefiles that wereTom Lane
supposing that they should set SHLIB_LINK rather than LDFLAGS_SL. Since these don't go through Makefile.shlib that was a no-op on most platforms. Also regularize the few platform-specific Makefiles that did pay attention to SHLIB_LINK: it seems that the real value of that is to pull in BE_DLLLIBS, so do that instead. Per buildfarm failures on cygwin.
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-07-05The previous fix in CVS HEAD and 8.4 for handling the case where a cursorHeikki Linnakangas
being used in a PL/pgSQL FOR loop is closed was inadequate, as Tom Lane pointed out. The bug affects FOR statement variants too, because you can close an implicitly created cursor too by guessing the "<unnamed portal X>" name created for it. To fix that, "pin" the portal to prevent it from being dropped while it's being used in a PL/pgSQL FOR loop. Backpatch all the way to 7.4 which is the oldest supported version.
2010-07-04Simplify test_fsync duration computation.Bruce Momjian
2010-07-04Report test_fynsc times in tests per second, instead of total seconds.Bruce Momjian
2010-07-03Don't set recoveryLastXTime when replaying a checkpoint --- that was a bogusTom Lane
idea from the start since the variable is only meant to track commit/abort events. This patch reverts the logic around the variable to what it was in 8.4, except that the value is now kept in shared memory rather than a static variable, so that it can be reported correctly by CreateRestartPoint (which is executed in the bgwriter).
2010-07-03Make vacuum_defer_cleanup_age be PGC_SIGHUP level, since it's not sensibleTom Lane
to have different values in different processes of the primary server. Also put it into the "Streaming Replication" GUC category; it doesn't belong in "Standby Servers" because you use it on the master not the standby. In passing also correct guc.c's idea of wal_keep_segments' category.
2010-07-03Replace max_standby_delay with two parameters, max_standby_archive_delay andTom Lane
max_standby_streaming_delay, and revise the implementation to avoid assuming that timestamps found in WAL records can meaningfully be compared to clock time on the standby server. Instead, the delay limits are compared to the elapsed time since we last obtained a new WAL segment from archive or since we were last "caught up" to WAL data arriving via streaming replication. This avoids problems with clock skew between primary and standby, as well as other corner cases that the original coding would misbehave in, such as the primary server having significant idle time between transactions. Per my complaint some time ago and considerable ensuing discussion. Do some desultory editing on the hot standby documentation, too.
2010-07-03Allow REASSIGNED OWNED to handle opclasses and opfamilies.Robert Haas
Backpatch to 8.3, which is as far back as we have opfamilies. The opclass portion could probably be backpatched to 8.2, when REASSIGN OWNED was added, but for now I have not done that. Asko Tiidumaa, with minor adjustments by me.
2010-07-02Unbreak MSVC builds by removing copydir.c from list of libpgport filesAndrew Dunstan
2010-07-02Move copydir.c from src/port to src/backend/storage/fileRobert Haas
The previous commit to make copydir() interruptible prevented postgres.exe from linking on MinGW and Cygwin, because on those platforms libpgport_srv.a can't freely reference symbols defined by the backend. Since that code is already backend-specific anyway, just move the whole file into the backend rather than adding further kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS(). This probably needs some further cleanup, but this commit just moves the file as-is, which should hopefully be enough to turn the buildfarm green again.
2010-07-02Issue 'mkdir' hint when replying CREATE TABLESPACE in recovery mode.Bruce Momjian
Per idea from Fujii Masao
2010-07-01Allow copydir() to be interrupted.Robert Haas
This makes ALTER DATABASE .. SET TABLESPACE and CREATE DATABASE more sensitive to interrupts. Backpatch to 8.4, where ALTER DATABASE .. SET TABLESPACE was introduced. We could go back further, but in the absence of complaints about the CREATE DATABASE case it doesn't seem worth it. Guillaume Lelarge, with a small correction by me.
2010-07-01Allow ALTER TABLE .. SET TABLESPACE to be interrupted.Robert Haas
Backpatch to 8.0, where tablespaces were introduced. Guillaume Lelarge