summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-03-18Put 'dump complete' message in the right place, so it comes out whereTom Lane
it's supposed to when --file option is used.
2005-03-18Need to reset local buffer pin counts, not only shared buffer pins,Tom Lane
before we attempt any file deletions in ShutdownPostgres. Per Tatsuo.
2005-03-18Added patch by Christof Petig <christof@petig-baender.de> to work around gcc ↵Michael Meskes
bug on powerpc and amd64.
2005-03-18Avoid infinite loop in InvalidateBuffer if we ourselves are holdingTom Lane
a pin on the victim buffer.
2005-03-18Need to release buffer pins before attempting to drop files duringTom Lane
backend exit. Per report from Bruce.
2005-03-18Treat EPERM as a non-error case when checking to see if old postmasterTom Lane
is still alive. This improves our odds of not getting fooled by an unrelated process when checking a stale lock file. Other checks already in place, plus one newly added in checkDataDir(), ensure that we cannot attempt to usurp the place of a postmaster belonging to a different userid, so there is no need to error out. Add comments indicating the importance of these other checks.
2005-03-17This patch moves some code for preprocessing FOR UPDATE fromNeil Conway
grouping_planner() to preprocess_targetlist(), according to a comment in grouping_planner(). I think the refactoring makes sense, and moves some extraneous details out of grouping_planner().
2005-03-17Update obsolete comment.Tom Lane
2005-03-17Trivial comment tweak.Neil Conway
2005-03-17Factor duplicate snprintf code into functions.Bruce Momjian
2005-03-16This patch makes \d on tables and views sort fk constraints, triggersNeil Conway
and rules alphabetically in the output. This makes it the same as for indexes and stops the irritating random or reverse ordering it currently has. Chris KL
2005-03-16Force initdb cause of encoding additions.Bruce Momjian
2005-03-16Revise TupleTableSlot code to avoid unnecessary construction and disassemblyTom Lane
of tuples when passing data up through multiple plan nodes. A slot can now hold either a normal "physical" HeapTuple, or a "virtual" tuple consisting of Datum/isnull arrays. Upper plan levels can usually just copy the Datum arrays, avoiding heap_formtuple() and possible subsequent nocachegetattr() calls to extract the data again. This work extends Atsushi Ogawa's earlier patch, which provided the key idea of adding Datum arrays to TupleTableSlots. (I believe however that something like this was foreseen way back in Berkeley days --- see the old comment on ExecProject.) A test case involving many levels of join of fairly wide tables (about 80 columns altogether) showed about 3x overall speedup, though simple queries will probably not be helped very much. I have also duplicated some code in heaptuple.c in order to provide versions of heap_formtuple and friends that use "bool" arrays to indicate null attributes, instead of the old convention of "char" arrays containing either 'n' or ' '. This provides a better match to the convention used by ExecEvalExpr. While I have not made a concerted effort to get rid of uses of the old routines, I think they should be deprecated and eventually removed.
2005-03-16Add sprintf support, that were were missing.Bruce Momjian
Add support for snprintf '+', 'h', and %* length settings.
2005-03-16pgindent snprintf.c for consistency.Bruce Momjian
2005-03-16Fix snprintf for %*$.Bruce Momjian
2005-03-16Add CVS \r\n regression tests.Bruce Momjian
Andrew Dunstan
2005-03-16Fix snprintf to handle %$ properly by storing and reordering theBruce Momjian
arguments. Nicolai Tufar
2005-03-16Add missing include for new lc_ctype_is_c() function.Bruce Momjian
Per Neil.
2005-03-16Prevent locale-aware handling of upper, lower, and initcap when theBruce Momjian
locale is C. Backpatch to 8.0.X because some operating systems were throwing errors for such operations, rather than ignoring the locale when it was C.
2005-03-16Wrap the implementation of fork_process() inside #ifndef WIN32 -- thisNeil Conway
should hopefully unbreak the Win32 build. Apologies for breaking it in the first place.
2005-03-14Issue free space notices to both the user and the server log file.Bruce Momjian
2005-03-14Make pg_dump emit a useful error message, instead of just dumping core,Tom Lane
if it finds a pg_rewrite entry for which there is no pg_class entry. Per report from Andrew Slobodyanyk.
2005-03-14Add support for Win1252 encoding.Bruce Momjian
Roland Volkmann
2005-03-14Bump minor version numbers for 8.1 compared to 8.0.Bruce Momjian
2005-03-14Avoid O(N^2) overhead in repeated nocachegetattr calls when columns ofTom Lane
a tuple are being accessed via ExecEvalVar and the attcacheoff shortcut isn't usable (due to nulls and/or varlena columns). To do this, cache Datums extracted from a tuple in the associated TupleTableSlot. Also some code cleanup in and around the TupleTable handling. Atsushi Ogawa with some kibitzing by Tom Lane.
2005-03-14Allow ALTER FUNCTION to change a function's strictness, volatility, andNeil Conway
whether or not it is a security definer. Changing a function's strictness is required by SQL2003, and the other capabilities make sense. Also, allow an optional RESTRICT noise word to be specified, for SQL conformance. Some trivial regression tests added and the documentation has been updated.
2005-03-14Update comments for new encoding names.Bruce Momjian
2005-03-13Add missing identification comment, remove entirely inappropriate includeTom Lane
of postgres.h.
2005-03-13Add some missing #includes.Tom Lane
2005-03-13Forgot that I had intended to replace division by masking in hash calculation.Tom Lane
2005-03-13Make default_with_oids default to false -- user-created tables will nowNeil Conway
no longer include OIDs, unless WITH OIDS is specified or the default_with_oids configuration parameter is enabled. Update the docs accordingly.
2005-03-13Update obsolete comment.Neil Conway
2005-03-13Document aliases for our supported encodings.Bruce Momjian
Add a few encodings that were not documented.
2005-03-12When cloning template0 (or other fully-frozen databases), set the newTom Lane
database's datallowconn and datfrozenxid to the current transaction ID instead of copying the source database's values. This is OK because we assume the source DB contains no normal transaction IDs whatsoever. This keeps VACUUM from immediately starting to complain about unvacuumed databases in the situation where we are more than 2 billion transactions out from the XID stamp of template0. Per discussion with Milen Radev (although his complaint turned out to be due to something else, but the problem is real anyway).
2005-03-12Fix ALTER DATABASE RENAME to allow the operation if user is a superuserTom Lane
who for some reason isn't marked usecreatedb. Per report from Alexander Pravking. Also fix sloppy coding in have_createdb_privilege().
2005-03-12Adjust the API for aggregate function calls so that a C-coded functionTom Lane
can tell whether it is being used as an aggregate or not. This allows such a function to avoid re-pallocing a pass-by-reference transition value; normally it would be unsafe for a function to scribble on an input, but in the aggregate case it's safe to reuse the old transition value. Make int8inc() do this. This gets a useful improvement in the speed of COUNT(*), at least on narrow tables (it seems to be swamped by I/O when the table rows are wide). Per a discussion in early December with Neil Conway. I also fixed int_aggregate.c to check this, thereby turning it into something approaching a supportable technique instead of being a crude hack.
2005-03-12Handle carriage returns and line feeds in COPY CSV mode.Bruce Momjian
Andrew Dunstan
2005-03-12Add warning about the need to increase "max_fsm_relations" andBruce Momjian
"max_fsm_relations" for vacuums. Also improve VACUUM VERBOSE final message text. Ron Mayer
2005-03-12Fix snprintf() to properly handle precision specification for %f.Bruce Momjian
2005-03-12Fix problem with infinite recursion between write_syslogger_file andTom Lane
elog if the former has trouble writing its file. Code review for Magnus' patch to redirect stderr to syslog on Windows (Bruce's version seems right, but did some minor prettification). Backpatch both changes to 8.0 branch.
2005-03-11Add fprintf() custom version to libpgport.Bruce Momjian
Document use of macros for pg_printf functions. Bump major versions of all interfaces to handle movement of get_progname from libpq to libpgport in 8.0, and probably other libpgport changes in 8.1.
2005-03-11Define snprintf() to call pg_snprintf() so our own snprintf-likeBruce Momjian
implementation doesn't export out via libpq and get used by a user application.
2005-03-11Add 'static' to initdb.c file-global variables.Bruce Momjian
2005-03-11Mark file-global function and variables as static.Bruce Momjian
2005-03-11Slight refactoring and optimization of some code in WaitOnLock().Neil Conway
2005-03-10Make the behavior of HAVING without GROUP BY conform to the SQL spec.Tom Lane
Formerly, if such a clause contained no aggregate functions we mistakenly treated it as equivalent to WHERE. Per spec it must cause the query to be treated as a grouped query of a single group, the same as appearance of aggregate functions would do. Also, the HAVING filter must execute after aggregate function computation even if it itself contains no aggregate functions.
2005-03-10Add spinlock support for Itanium processor with Intel compiler.Bruce Momjian
Vikram Kalsi
2005-03-10Refactor fork()-related code. We need to do various housekeeping tasksNeil Conway
before we can invoke fork() -- flush stdio buffers, save and restore the profiling timer on Linux with LINUX_PROFILE, and handle BeOS stuff. This patch moves that code into a single function, fork_process(), instead of duplicating it at the various callsites of fork(). This patch doesn't address the EXEC_BACKEND case; there is room for further cleanup there.
2005-03-07Unbreak out-of-tree builds, by fixing a typo.Neil Conway