aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* When a relation has been proven empty by constraint exclusion, propagate thatTom Lane2008-03-24
| | | | | | | | knowledge up through any joins it participates in. We were doing that already in some special cases but not in the general case. Also, defend against zero row estimates for the input relations in cost_mergejoin --- this fix may have eliminated the only scenario in which that can happen, but be safe. Per report from Alex Solovey.
* Use new errdetail_log() mechanism to provide a less klugy way of reportingTom Lane2008-03-24
| | | | | large numbers of dependencies on a role that couldn't be dropped. Per a comment from Alvaro.
* Fix various infelicities that have snuck into usage of errdetail() andTom Lane2008-03-24
| | | | | | friends. Avoid double translation of some messages, ensure other messages are exposed for translation (and make them follow the style guidelines), avoid unsafe passing of an unpredictable message text as a format string.
* Adjust the recent patch for reporting of deadlocked queries so that we reportTom Lane2008-03-24
| | | | | | | | query texts only to the server log. This eliminates the issue of possible leaking of security-sensitive data in other sessions' queries. Since the log is presumed secure, we can now log the queries of all sessions involved in the deadlock, whether or not they belong to the same user as the one reporting the failure.
* Add a new ereport auxiliary function errdetail_log(), which works the same asTom Lane2008-03-24
| | | | | | | | errdetail except the string goes only to the server log, replacing the normal errdetail there. This provides a reasonably clean way of dealing with error details that are too security-sensitive or too bulky to send to the client. This commit just adds the infrastructure --- actual uses to follow.
* Avoid a useless tuple copy within nodeMaterial. Neil ConwayTom Lane2008-03-23
|
* Create a function quote_nullable(), which works the same as quote_literal()Tom Lane2008-03-23
| | | | | | | | | except that it returns the string 'NULL', rather than a SQL null, when called with a null argument. This is often a much more useful behavior for constructing dynamic queries. Add more discussion to the documentation about how to use these functions. Brendan Jurd
* Refactor to_char/to_date formatting code; primarily, replace DCH_processorTom Lane2008-03-22
| | | | | with two new functions DCH_to_char and DCH_from_char that have less confusing APIs. Brendan Jurd
* Add server side lo_import(filename, oid) function.Tatsuo Ishii2008-03-22
|
* Remove TypeName struct's timezone flag, which has been write-only storageTom Lane2008-03-21
| | | | | for a very long time --- in current usage it's entirely redundant with the name field.
* Give an explicit error for serial[], rather than silently ignoringTom Lane2008-03-21
| | | | the array decoration as the code had been doing.
* Report the current queries of all backends involved in a deadlockTom Lane2008-03-21
| | | | | | | | | | | | | | | (if they'd be visible to the current user in pg_stat_activity). This might look like it's subject to race conditions, but it's actually pretty safe because at the time DeadLockReport() is constructing the report, we haven't yet aborted our transaction and so we can expect that everyone else involved in the deadlock is still blocked on some lock. (There are corner cases where that might not be true, such as a statement timeout triggering in another backend before we finish reporting; but at worst we'd report a misleading activity string, so it seems acceptable considering the usefulness of reporting the queries.) Original patch by Itagaki Takahiro, heavily modified by me.
* Corrected version number.Michael Meskes2008-03-21
|
* More README src cleanups.Bruce Momjian2008-03-21
|
* Generate dummy probes.h for MSVC builds.Andrew Dunstan2008-03-21
|
* Get rid of a bunch of #ifdef HAVE_INT64_TIMESTAMP conditionals by inventingTom Lane2008-03-21
| | | | | | | | | | a new typedef TimeOffset to represent an intermediate time value. It's either int64 or double as appropriate, and in most usages will be measured in microseconds or seconds the same as Timestamp. We don't call it Timestamp, though, since the value doesn't necessarily represent an absolute time instant. Warren Turkal
* Arrange for an explicit cast applied to an ARRAY[] constructor to be appliedTom Lane2008-03-20
| | | | | | | | | | directly to all the member expressions, instead of the previous implementation where the ARRAY[] constructor would infer a common element type and then we'd coerce the finished array after the fact. This has a number of benefits, one being that we can allow an empty ARRAY[] construct so long as its element type is specified by such a cast. Brendan Jurd, minor fixes by me.
* Add a couple of missing FreeQueryDesc calls. Noticed while testing aAlvaro Herrera2008-03-20
| | | | framework to keep track of snapshots in use.
* Make source code READMEs more consistent. Add CVS tags to all README files.Bruce Momjian2008-03-20
|
* Dept of second thoughts: --no-tablespaces had better also preventTom Lane2008-03-20
| | | | pg_dumpall from attaching TABLESPACE options to CREATE DATABASE commands.
* Support a --no-tablespaces option in pg_dump/pg_dumpall/pg_restore, so thatTom Lane2008-03-20
| | | | | | | | dumps can be loaded into databases without the same tablespaces that the source had. The option acts by suppressing all "SET default_tablespace" commands, and also CREATE TABLESPACE commands in pg_dumpall's case. Gavin Roy, with documentation and minor fixes by me.
* Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.Michael Meskes2008-03-20
| | | | Removed one include file from connect-test1.
* Changed statement escaping to not escape continuation line markers.Michael Meskes2008-03-20
|
* Add the missing cyrillic "Yo" characters ('e' and 'E' with two dots) to theHeikki Linnakangas2008-03-20
| | | | | | | | | | | | | | | ISO_8859-5 <-> MULE_INTERNAL conversion tables. This was discovered when trying to convert a string containing those characters from ISO_8859-5 to Windows-1251, because we use MULE_INTERNAL/KOI8R as an intermediate encoding between those two. While the missing "Yo" was just an omission in the conversion tables, there are a few other characters like the "Numero" sign ("No" as a single character) that exists in all the other cyrillic encodings (win1251, ISO_8859-5 and cp866), but not in KOI8R. Added comments about that. Patch by Sergey Burladyan. Back-patch to 7.4.
* Remove another useless snapshot creation.Alvaro Herrera2008-03-19
|
* Support ALTER TYPE RENAME. Petr JelinekTom Lane2008-03-19
|
* We no longer need a snapshot set after opening the finishing transaction: thisAlvaro Herrera2008-03-19
| | | | | is redundant because autovacuum now always analyzes a single table per transaction.
* Fix regexp substring matching (substring(string from pattern)) for the cornerTom Lane2008-03-19
| | | | | | | | | | | | case where there is a match to the pattern overall but the user has specified a parenthesized subexpression and that subexpression hasn't got a match. An example is substring('foo' from 'foo(bar)?'). This should return NULL, since (bar) isn't matched, but it was mistakenly returning the whole-pattern match instead (ie, 'foo'). Per bug #4044 from Rui Martins. This has been broken since the beginning; patch in all supported versions. The old behavior was sufficiently inconsistent that it's impossible to believe anyone is depending on it.
* Add libpq new API lo_import_with_oid() which is similar to lo_import()Tatsuo Ishii2008-03-19
| | | | except that lob's oid can be specified.
* Add find_typedef comments for Linux.Bruce Momjian2008-03-18
|
* Add find_typedef comment.Bruce Momjian2008-03-18
|
* Add Linux support to find_typedefs, with help from Alvaro.Bruce Momjian2008-03-18
|
* Arrange to "inline" SQL functions that appear in a query's FROM clause,Tom Lane2008-03-18
| | | | | | | are declared to return set, and consist of just a single SELECT. We can replace the FROM-item with a sub-SELECT and then optimize much as if we were dealing with a view. Patch from Richard Rowell, cleaned up by me.
* Don't need -Wno-error anymore, because flex is no longer producing warnings.Peter Eisentraut2008-03-18
|
* Catch all errors in for and while loops in makefiles. Don't ignore anyPeter Eisentraut2008-03-18
| | | | | | errors in any commands, including in various clean targets that have so far been handled inconsistently. make -i is available to ignore all errors in a consistent and official way.
* Move elog(DEBUG4) call outside the locked area, per suggestion from Tom Lane.Alvaro Herrera2008-03-18
|
* Advance multiple array keys rightmost-first instead of leftmost-firstTom Lane2008-03-18
| | | | | | during a bitmap index scan. This cannot affect the query results (since we're just dumping the TIDs into a bitmap) but it might offer some advantage in locality of access to the index. Per Greg Stark.
* Fix our printf implementation to follow spec: if a star parameterTom Lane2008-03-18
| | | | | | | | | | | value for a precision is negative, act as though precision weren't specified at all, that is the whole .* part of the format spec should be ignored. Our previous coding took it as .0 which is certainly wrong. Per report from Kris Jurka and local testing. Possibly this should be back-patched, but it would be good to get some more testing first; in any case there are no known cases where there's really a problem on the backend side.
* Enable probes to work with Mac OS X Leopard and other OSes that willPeter Eisentraut2008-03-17
| | | | | | | | | | | support DTrace in the future. Switch from using DTRACE_PROBEn macros to the dynamically generated macros. Use "dtrace -h" to create a header file that contains the dynamically generated macros to be used in the source code instead of the DTRACE_PROBEn macros. A dummy header file is generated for builds without DTrace support. Author: Robert Lor <Robert.Lor@sun.com>
* We need to rebuild objfiles.txt when one of the subdirectories' objfiles.txtPeter Eisentraut2008-03-17
| | | | changed in case a new file got added.
* Fix postgres --describe-config for guc enums, breakage noted by Alvaro.Magnus Hagander2008-03-17
| | | | | While at it, rename option lookup functions to make names clearer, per discussion with Tom.
* Revert thinko introduced into prefix_selectivity() by my recent patch:Tom Lane2008-03-17
| | | | | make_greater_string needs the < procedure not the >= one. Spotted by Peter.
* Move ProcState definition into sinvaladt.c from sinvaladt.h, since it's notAlvaro Herrera2008-03-17
| | | | | | needed anywhere after my previous patch. Noticed by Tom Lane. Also, remove #include <signal.h> from sinval.c.
* Grab some low-hanging fruit in the new hash index build code.Tom Lane2008-03-17
| | | | | | | oprofile shows that a nontrivial amount of time is being spent in repeated calls to index_getprocinfo, which really only needs to be called once. So do that, and inline _hash_datum2hashkey to make it work.
* Fix TransactionIdIsCurrentTransactionId() to use binary search instead ofTom Lane2008-03-17
| | | | | | | | | linear search when checking child-transaction XIDs. This makes for an important speedup in transactions that have large numbers of children, as in a recent example from Craig Ringer. We can also get rid of an ugly kluge that represented lists of TransactionIds as lists of OIDs. Heikki Linnakangas
* When creating a large hash index, pre-sort the index entries by estimatedTom Lane2008-03-16
| | | | | | | | | | bucket number, so as to ensure locality of access to the index during the insertion step. Without this, building an index significantly larger than available RAM takes a very long time because of thrashing. On the other hand, sorting is just useless overhead when the index does fit in RAM. We choose to sort when the initial index size exceeds effective_cache_size. This is a revised version of work by Tom Raney and Shreya Bhargava.
* Modify interactions between sinval.c and sinvaladt.c. The code that actuallyAlvaro Herrera2008-03-16
| | | | | | | | deals with the queue, including locking etc, is all in sinvaladt.c. This means that the struct definition of the queue, and the queue pointer, are now internal "implementation details" inside sinvaladt.c. Per my proposal dated 25-Jun-2007 and followup discussion.
* Some cleanups of enum-guc code, per comments from Tom.Magnus Hagander2008-03-16
|
* Change hash index creation so that rather than always establishing exactlyTom Lane2008-03-15
| | | | | | | | | | | two buckets at the start, we create a number of buckets appropriate for the estimated size of the table. This avoids a lot of expensive bucket-split actions during initial index build on an already-populated table. This is one of the two core ideas of Tom Raney and Shreya Bhargava's patch to reduce hash index build time. I'm committing it separately to make it easier for people to test the effects of this separately from the effects of their other core idea (pre-sorting the index entries by bucket number).
* Fix inappropriately-timed memory context switch in autovacuum_do_vac_analyze.Tom Lane2008-03-14
| | | | | | This accidentally failed to fail before 8.3, because the context we were switching back to was long-lived anyway; but it sure looks risky as can be now. Well spotted by Pavan Deolasee.