aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Fix ALTER DATABASE RENAME to allow the operation if user is a superuserTom Lane2005-03-12
| | | | | who for some reason isn't marked usecreatedb. Per report from Alexander Pravking. Also fix sloppy coding in have_createdb_privilege().
* Adjust the API for aggregate function calls so that a C-coded functionTom Lane2005-03-12
| | | | | | | | | | | | | 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.
* Handle carriage returns and line feeds in COPY CSV mode.Bruce Momjian2005-03-12
| | | | Andrew Dunstan
* Add warning about the need to increase "max_fsm_relations" andBruce Momjian2005-03-12
| | | | | | | "max_fsm_relations" for vacuums. Also improve VACUUM VERBOSE final message text. Ron Mayer
* Fix snprintf() to properly handle precision specification for %f.Bruce Momjian2005-03-12
|
* Fix problem with infinite recursion between write_syslogger_file andTom Lane2005-03-12
| | | | | | | | 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.
* Add fprintf() custom version to libpgport.Bruce Momjian2005-03-11
| | | | | | | 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.
* Define snprintf() to call pg_snprintf() so our own snprintf-likeBruce Momjian2005-03-11
| | | | | implementation doesn't export out via libpq and get used by a user application.
* Add 'static' to initdb.c file-global variables.Bruce Momjian2005-03-11
|
* Mark file-global function and variables as static.Bruce Momjian2005-03-11
|
* Slight refactoring and optimization of some code in WaitOnLock().Neil Conway2005-03-11
|
* Make the behavior of HAVING without GROUP BY conform to the SQL spec.Tom Lane2005-03-10
| | | | | | | | | 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.
* Add spinlock support for Itanium processor with Intel compiler.Bruce Momjian2005-03-10
| | | | Vikram Kalsi
* Refactor fork()-related code. We need to do various housekeeping tasksNeil Conway2005-03-10
| | | | | | | | | | 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.
* Unbreak out-of-tree builds, by fixing a typo.Neil Conway2005-03-07
|
* Replace an instance of $Id$ and an instance of $Header$ with $PostgreSQL$Neil Conway2005-03-07
|
* Properly implement "Response files" for bcc. Add URL's to describe theBruce Momjian2005-03-07
| | | | feature for Win32 and bcc.
* Adjust creation/destruction of TupleDesc data structure to reduce theTom Lane2005-03-07
| | | | | | number of palloc calls. This has a salutory impact on plpgsql operations with record variables (which create and destroy tupdescs constantly) and probably helps a bit in some other cases too.
* Rename canonical encodings, per Peter:Bruce Momjian2005-03-07
| | | | | | | | | UNICODE => UTF8 ALT => WIN866 WIN => WIN1251 TCVN => WIN1258 The old codes continue to work.
* Here's a tiny fix for a harmless typo in catalog.c:Neil Conway2005-03-07
| | | | | | | | Too much space is allocated for tablespace file path, I guess the directory name used to be "pg_tablespaces" instead of "pg_tblspc" at some point. Heikki Linnakangas
* Revise hash join code so that we can increase the number of batchesTom Lane2005-03-06
| | | | | | | on-the-fly, and thereby avoid blowing out memory when the planner has underestimated the hash table size. Hash join will now obey the work_mem limit with some faithfulness. Per my recent proposal (hash aggregate part isn't done yet though).
* Replace the BufMgrLock with separate locks on the lookup hashtable andTom Lane2005-03-04
| | | | | | | | the freelist, plus per-buffer spinlocks that protect access to individual shared buffer headers. This requires abandoning a global freelist (since the freelist is a global contention point), which shoots down ARC and 2Q as well as plain LRU management. Adopt a clock sweep algorithm instead. Preliminary results show substantial improvement in multi-backend situations.
* Move snprintf int64 compatibility letters into a NOT_USED block.Bruce Momjian2005-03-02
|
* Fix for %I64d snprintf.Bruce Momjian2005-03-02
|
* snprintf() %I64d code fix.Bruce Momjian2005-03-02
|
* Use our own snprintf() only if NLS is enabled, and support %qd and %I64d.Bruce Momjian2005-03-02
|
* Prevent large allocation in snprintf to hold positional parameters.Bruce Momjian2005-03-02
| | | | Allocated size based on format string.
* Another go at making pred_test() handle all reasonable combinationsTom Lane2005-03-02
| | | | | | | | | | of AND and OR clauses. The key point here is that an OR on the predicate side has to be treated gingerly: we may be able to prove that the OR is implied even when no one of its components is implied. For example (x OR y) implies (x OR y OR z) even though no one of x, y, or z can be individually proven. This code handles both the example shown recently by Sergey Koshcheyev and the one shown last October by Dawid Kuroczko.
* Fix snprintf on Win32:Bruce Momjian2005-03-02
| | | | | * If vsnprintf() is not before snprintf() in this file, snprintf() * will call the system vsnprintf() on MinGW.
* Make port snprintf.c finally thread-safe.Bruce Momjian2005-03-02
|
* Release proclock immediately in RemoveFromWaitQueue() if it representsTom Lane2005-03-01
| | | | | | no held locks. This maintains the invariant that proclocks are present only for procs that are holding or awaiting a lock; when this is not true, LockRelease will fail. Per report from Stephen Clouse.
* Allow Trace_lock_oidmin to be set to zero; this is a reasonableTom Lane2005-03-01
| | | | representation of not wanting tracing to be limited by object OID.
* Make snprintf() use already-defined int64/uint64 typedefs rather thanBruce Momjian2005-03-01
| | | | defining its own.
* Adjust OR indexscan logic to not generate redundant condition-free ORTom Lane2005-03-01
| | | | | | indexscans involving partial indexes. These would always be dominated by a simple indexscan on such an index, so there's no point in considering them. Fixes overoptimism in a patch I applied last October.
* And while we are on it, I would like to submit minorBruce Momjian2005-03-01
| | | | | | | changes to make snprintf() vsnprintf() and printf() functions in src/port/snprintf.c thread-safe. Nicolai Tufar
* Revert the logic for expanding AND/OR conditions in pred_test() to whatTom Lane2005-03-01
| | | | | | it was in 7.4, and add some comments explaining why it has to be this way. I broke it for OR'd index predicates in a fit of code cleanup last summer. Per example from Sergey Koshcheyev.
* snprintf.c has no sys/ioctl.h. Trivial patch below:Bruce Momjian2005-02-28
| | | | Magnus Hagander
* Implement max() and min() aggregates for array types. Patch from KojuNeil Conway2005-02-28
| | | | | Iijima, reviewed by Neil Conway. Catalog version number bumped, regression tests updated.
* Because the change to gettext. Needs a bunch of new includes. PatchBruce Momjian2005-02-27
| | | | | | follows: Magnus Hagander
* Tab indent all actions in bcc32.mak, and do it on win32.mak too forBruce Momjian2005-02-27
| | | | consistency. Backpatch only bcc32.mak to 8.0.X.
* Add explicit casts between int4 and boolean. Patch from Sean Chittenden,Neil Conway2005-02-27
| | | | editorializing by Neil Conway. Catalog version bumped.
* Cause Win32 to output to the event log rather than stderr by default.Bruce Momjian2005-02-27
| | | | Magnus Hagander
* Allow Win32 to support the O_SYNC open flag as an wal_sync_method method.Bruce Momjian2005-02-27
| | | | Magnus Hagander
* Finish up the flat-files project: get rid of GetRawDatabaseInfo() hackTom Lane2005-02-26
| | | | | | | | | | | in favor of looking at the flat file copy of pg_database during backend startup. This should finally eliminate the various corner cases in which backend startup fails unexpectedly because it isn't able to distinguish live and dead tuples in pg_database. Simplify locking on pg_database to be similar to the rules used with pg_shadow and pg_group, and eliminate FlushRelationBuffers operations that were used only to reduce the odds of failure of GetRawDatabaseInfo. initdb forced due to addition of a trigger to pg_database.
* In accordance toTeodor Sigaev2005-02-25
| | | | | | | | http://www.pgsql.ru/db/mw/msg.html?mid=2045361 change TimeATD to/from Datum macros. Re-initdb is needed.
* Add linking from /port to bcc makefile.Bruce Momjian2005-02-25
|
* My patch this morning was overly hasty; revert code to original state.Tom Lane2005-02-24
|
* Minor code cleanup: remove a variable that was assigned to but neverNeil Conway2005-02-23
| | | | | | | subsequently referenced. Found by: Coverity Fixed by: Sean Chittenden
* This patch optimizes the md5_text() function (which is used toNeil Conway2005-02-23
| | | | | | | | | | | | | | | | | | | | | | | | implement the md5() SQL-level function). The old code did the following: 1. de-toast the datum 2. convert it to a cstring via textout() 3. get the length of the cstring via strlen() Since we are treating the datum context as a blob of binary data, the latter two steps are unnecessary. Once the data has been detoasted, we can just use it as-is, and derive its length from the varlena metadata. This patch improves some run-of-the-mill md5() computations by just under 10% in my limited tests, and passes the regression tests. I also noticed that md5_text() wasn't checking the return value of md5_hash(); encountering OOM at precisely the right moment could result in returning a random md5 hash. This patch corrects that. A better fix would be to make md5_hash() only return on success (and/or allocate via palloc()), but since it's used in the frontend as well I don't see an easy way to do that.
* Un-break plpgsql build by removing unwanted _() usage.Tom Lane2005-02-23
| | | | | This would be a completely inappropriate place to apply localization anyway.