summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2006-01-11Brace cleanup.Bruce Momjian
2006-01-11Create a standard function pg_sleep() to sleep for a specified amount of time.Tom Lane
Replace the former ad-hoc implementation used in the regression tests. Joachim Wieland
2006-01-11Cosmetic code cleanup: fix a bunch of places that used "return (expr);"Neil Conway
rather than "return expr;" -- the latter style is used in most of the tree. I kept the parentheses when they were necessary or useful because the return expression was complex.
2006-01-11Remove a confusing pair of parentheses.Neil Conway
2006-01-10Improve error messages for missing-FROM-entry cases, as per recent discussion.Tom Lane
2006-01-10Minor code clarity improvement: AFAICS, estate.eval_econtext must beNeil Conway
non-NULL during the guts of plpgsql_exec_trigger() and plpgsql_exec_function(). Therefore, we can remove the NULL check, per discussion on -patches.
2006-01-10Improve patternsel() by applying the operator itself to each valueTom Lane
listed in the column's most-common-values statistics entry. This gives us an exact selectivity result for the portion of the column population represented by the MCV list, which can be a big leg up in accuracy if that's a large fraction of the population. The heuristics involving pattern contents and prefix are applied only to the part of the population not included in the MCV list.
2006-01-10remove unneeded defines for uid_t and gid_t, which conflict with perl's ↵Andrew Dunstan
typedefs.
2006-01-10In PLy_function_build_args(), the code loops repeatedly, constructingNeil Conway
one argument at a time and then inserting the argument into a Python list via PyList_SetItem(). This "steals" the reference to the argument: that is, the reference to the new list member is now held by the Python list itself. This works fine, except if an elog occurs. This causes the function's PG_CATCH() block to be invoked, which decrements the reference counts on both the current argument and the list of arguments. If the elog happens to occur during the second or subsequent iteration of the loop, the reference count on the current argument will be decremented twice. The fix is simple: set the local pointer to the current argument to NULL immediately after adding it to the argument list. This ensures that the Py_XDECREF() in the PG_CATCH() block doesn't double-decrement.
2006-01-09Fix pg_dump to add the required OPERATOR() decoration to schema-qualifiedTom Lane
operator names. This is needed when dumping operator definitions that have COMMUTATOR (or similar) links to operators in other schemas. Apparently Daniel Whitter is the first person ever to try this :-(
2006-01-09Change allow_system_table_mods to PGC_POSTMASTER, restoring previousPeter Eisentraut
behavior.
2006-01-09Minor code cleanup for PL/Python: fixup some strangely formatted comments,Neil Conway
and change two elogs into ereports because they could actually occur in practice.
2006-01-08Rationalise perl header inclusions via a common include file, which alsoAndrew Dunstan
declares routines in plperl.c and spi_internal.c used in other files. Along the way, also stop perl from hijacking stdio and other stuff on Windows.
2006-01-08Fix the assert_enabled issue properly. This eliminates the former ABITom Lane
difference between USE_ASSERT_CHECKING and not: the assert_enabled variable is always there.
2006-01-08Recent patch broke guc.c for non-USE_ASSERT_CHECKING case. PerTom Lane
Stefan Kaltenbrunner.
2006-01-08Avoid leaking memory while reading toasted entries from pg_rewrite,Tom Lane
and nail a couple more system indexes into cache. This doesn't make any difference in normal system operation, but when forcing constant cache resets it's difficult to get through the rules regression test without these changes.
2006-01-08Add a new system view, pg_prepared_statements, that can be used toNeil Conway
access information about the prepared statements that are available in the current session. Original patch from Joachim Wieland, various improvements by Neil Conway. The "statement" column of the view contains the literal query string sent by the client, without any rewriting or pretty printing. This means that prepared statements created via SQL will be prefixed with "PREPARE ... AS ", whereas those prepared via the FE/BE protocol will not. That is unfortunate, but discussion on -patches did not yield an efficient way to improve this, and there is some merit in returning exactly what the client sent to the backend. Catalog version bumped, regression tests updated.
2006-01-07Add RelationOpenSmgr() calls to ensure rd_smgr is valid when we try toTom Lane
use it. While it normally has been opened earlier during btree index build, testing shows that it's possible for the link to be closed again if an sinval reset occurs while the index is being built.
2006-01-07Add comment explaining why RelationOpenSmgr() call is not needed.Tom Lane
2006-01-07During CatCacheRemoveCList, we must now remove any members that areTom Lane
dead and have become unreferenced. Before 8.1, such members were left for AtEOXact_CatCache() to clean up, but now AtEOXact_CatCache isn't supposed to have anything to do. In an assert-enabled build this bug leads to an assertion failure at transaction end, but in a non-assert build the dead member is effectively just a small memory leak. Per report from Jeremy Drake.
2006-01-06Fix failure to apply domain constraints to a NULL constant that's added toTom Lane
an INSERT target list during rule rewriting. Per report from John Supplee.
2006-01-06Use RELKIND_COMPOSITE_TYPE rather than hardcoded 'c'.Bruce Momjian
2006-01-06Fix Windows-only postmaster code to reject a connection request and continue,Tom Lane
rather than elog(FATAL), when there is no more room in ShmemBackendArray. This is a security issue since too many connection requests arriving close together could cause the postmaster to shut down, resulting in denial of service. Reported by Yoshiyuki Asaba, fixed by Magnus Hagander.
2006-01-06Convert Assert checking for empty page into a regular test and elog.Tom Lane
The consequences of overwriting a non-empty page are bad enough that we should not omit this test in production builds.
2006-01-06Fix ReadBuffer() to correctly handle the case where it's trying to extendTom Lane
the relation but it finds a pre-existing valid buffer. The buffer does not correspond to any page known to the kernel, so we *must* do smgrextend to ensure that the space becomes allocated. The 7.x branches all do this correctly, but the corner case got lost somewhere during 8.0 bufmgr rewrites. (My fault no doubt :-( ... I think I assumed that such a buffer must be not-BM_VALID, which is not so.)
2006-01-05Update x86 Solaris documenation ideas.Bruce Momjian
2006-01-05Add compile flags sample.Bruce Momjian
2006-01-05Make all command-line options of postmaster and postgres the same. SeePeter Eisentraut
http://archives.postgresql.org/pgsql-hackers/2006-01/msg00151.php for the complete plan.
2006-01-05Remove BEOS port.Bruce Momjian
2006-01-05Remove QNX file.Bruce Momjian
2006-01-05Remove QNX port.Bruce Momjian
2006-01-04Rearrange backend startup sequence so that ShmemIndexLock can becomeTom Lane
an LWLock instead of a spinlock. This hardly matters on Unix machines but should improve startup performance on Windows (or any port using EXEC_BACKEND). Per previous discussion.
2006-01-04Fix another case in which autovacuum would fail while analyzingTom Lane
expressional indexes. Per report from Brian Hirt.
2006-01-03Fix incorrect treatment of RL_PROMPT_START_IGNORE/RL_PROMPT_END_IGNORE,Tom Lane
per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343616 via Martin Pitt.
2006-01-03Add checks to verify that a plpgsql function returning a rowtype is actuallyTom Lane
returning the rowtype it's supposed to return. Per reports from David Niblett and Michael Fuhr.
2006-01-03Assume select() might modify struct timeout, so remove previousBruce Momjian
optimization.
2006-01-03Use setitimer() for stats file write, rather than do a gettimeofday()Bruce Momjian
call for every stats packet read to adjust select() timeout. Other stylistic improvements.
2006-01-02Don't assume that LC_MESSAGES is always available on WIN32. Per Magnus.Tom Lane
2006-01-02Reset flex state in a way that works for both flex 2.5.4 and 2.5.31.Tom Lane
2006-01-02Remove the nexus between trial_buffs and trial_conns, and don't test shared ↵Andrew Dunstan
buffers lower than or equal to a value we already know is good, but use that value instead. This will make it easier to adjust the trial values and/or formulae in future if necessary.
2006-01-02Remove unnecessary assignment, per Tom.Bruce Momjian
2006-01-02Change if (!(x || y)) construct with if (!x && !y), for clarity.Bruce Momjian
2006-01-01Rewrite ProcessConfigFile() to avoid misbehavior at EOF, as per reportTom Lane
from Andrus Moor. The former state-machine-style coding wasn't actually doing much except obscuring the control flow, and it didn't extend readily to fix this case, so I just took it out. Also, add a YY_FLUSH_BUFFER call to ensure the lexer is reset correctly if the previous scan failed partway through the file.
2006-01-01Remove DOS line endings ("\r\n") from several .po files. DOS line endingsNeil Conway
are inconsistent with the rest of the .po files, and apparently cause problems for Sun's cc. Per report on IRC from "bitvector2".
2006-01-01Trim an obsolete comment: it is no longer relevant that "SELECT" wasNeil Conway
formerly "RETRIEVE", and so forth.
2005-12-31Clean up initdb's code for selecting max_connections and shared_buffersTom Lane
a little bit, and set the minimum buffers-per-connection ratio to 10 not 5. I folded the two test routines into one to counteract the illusion that the tests can be twiddled independently, and added some documentation pointing out the necessary connection between the sets of values tested. Fixes strange choices of parameters that I noticed CVS tip making on Darwin with Apple's undersized default SHMMAX.
2005-12-31Rename variable to cmd_str.Bruce Momjian
2005-12-31Rename variable 'what' to 'stat_msg'.Bruce Momjian
2005-12-31Prefix client-side prepare with '[protocol]' rather than '[client]'.Bruce Momjian
2005-12-30Rename send_rfq to send_ready_for_query.Bruce Momjian