aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAge
...
* Back out fix for Unicode characters above 0x10000Bruce Momjian2004-12-03
|
* Fix for Unicode characters above 0x10000.Bruce Momjian2004-12-02
| | | | John Hansen
* On win32, there is currently no way to get the equivalent function ofBruce Momjian2004-12-02
| | | | | | | | | | | | | | | the "ps" argument list on Unix - meaning that there is no way to identify for example the stats processors or the bgwriter. This patch adds this functionality, in a bit of a crufty way. It creates a kernel Event object with the name of what would be in the title. This can be viewed using for example Process Explorer. It's been very handy for me during both debugging and using. I haven't figured a better way, but perhaps someone has one that's less crufty? If not, here is at least a working patch :-) Magnus Hagander
* Add Charset WIN1252 support.Bruce Momjian2004-12-02
| | | | Roland Volkmann
* Teach regex_fixed_prefix() the correct handling of advanced regexTom Lane2004-12-02
| | | | | | escapes --- they aren't simply quoted characters. Problem noted by Antti Salmela. Also fix problem with incorrect handling of multibyte characters when followed by a quantifier.
* Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332.Tom Lane2004-12-01
|
* Our interface code for Spencer's regexp package was checking for regexpTom Lane2004-11-24
| | | | | | | error conditions during regexp compile, but not during regexp execution; any sort of "can't happen" errors would be treated as no-match instead of being reported as they should be. Noticed while trying to duplicate a reported Tcl bug.
* A client_encoding specification coming from the connection request hasTom Lane2004-11-24
| | | | | | | | | | to be processed by GUC before InitPostgres, because any required lookup of the encoding conversion function has to be done during InitializeClientEncoding. So, I broke this last week by moving GUC processing to after InitPostgres :-(. What we can do as a compromise is process non-SUSET variables during command line scanning (the same as before), and postpone the processing of only SUSET variables. None of the SUSET variables need to be set before InitPostgres.
* Fix rounding problem in dynahash.c's decision about when the targetTom Lane2004-11-21
| | | | | | | | fill factor has been exceeded. We usually run with ffactor == 1, but the way the test was coded, it wouldn't split a bucket until the actual fill factor reached 2.0, because of use of integer division. Change from > to >= so that it will split more aggressively when the table starts to get full.
* Reduce the default size of the PortalHashTable in order to save aTom Lane2004-11-21
| | | | | | few cycles during transaction exit. A typical session probably wouldn't have as many as half a dozen portals open at once, so the original value of 64 seems far larger than needed.
* Patch of 2004-03-30 corrected date_part(timestamp) for extractingTom Lane2004-11-20
| | | | | the year from a BC date, but failed to make the same fix in date_part(timestamptz).
* Avoid scanning the relcache during AtEOSubXact_RelationCache when thereTom Lane2004-11-20
| | | | | is nothing to do, which is most of the time. This is another simple improvement to cut subtransaction entry/exit overhead.
* Fix unportable isdigit() call --- must cast arg to unsigned char.Tom Lane2004-11-20
|
* Remove GUC USERLIMIT variable category, making the affected variablesTom Lane2004-11-14
| | | | | | | plain SUSET instead. Also delay processing of options received in client connection request until after we know if the user is a superuser, so that SUSET values can be set that way by legitimate superusers. Per recent discussion.
* Remember to close the file on failure (pretty much redundant, really,Tom Lane2004-11-12
| | | | since this path will lead to postmaster exit anyway...)
* Un-break custom_variable_classes kluge ... mea culpa.Tom Lane2004-11-11
|
* Use a hopefully-more-reliable method of detecting default selectivityTom Lane2004-11-09
| | | | | | | | | | | estimates when combining the estimates for a range query. As pointed out by Miquel van Smoorenburg, the existing check for an impossible combined result would quite possibly fail to detect one default and one non-default input. It seems better to use the default range query estimate in such cases. To do so, add a check for an estimate of exactly DEFAULT_INEQ_SEL. This is a bit ugly because it introduces additional coupling between clauselist_selectivity and scalarltsel/scalargtsel, but it's not like there wasn't plenty already...
* Create 'default_tablespace' GUC variable that supplies a TABLESPACETom Lane2004-11-05
| | | | | | | | | | clause implicitly whenever one is not given explicitly. Remove concept of a schema having an associated tablespace, and simplify the rules for selecting a default tablespace for a table or index. It's now just (a) explicit TABLESPACE clause; (b) default_tablespace if that's not an empty string; (c) database's default. This will allow pg_dump to use SET commands instead of tablespace clauses to determine object locations (but I didn't actually make it do so). All per recent discussions.
* Minor documentation updates from Simon Riggs.Tom Lane2004-11-04
|
* timestamptz_trunc() should only recalculate the timezone when truncatingTom Lane2004-11-01
| | | | | | | | | to DAY precision or coarser; leave the timezone alone when precision is HOUR or less. This avoids surprises for inputs near a DST transition time, as per example from Matthew Gabeler-Lee. (The only reason we recalculate at all is so that outputs that are supposed to represent days will come out as local midnight, and that's not relevant for sub-day precision.)
* Invent pg_next_dst_boundary() and rewrite DetermineLocalTimeZone() toTom Lane2004-11-01
| | | | | | | | | | | | use it, as per my proposal of yesterday. This gives us a means of determining the zone offset to impute to an unlabeled timestamp that is both efficient and reliable, unlike all our previous tries involving mktime() and localtime(). The behavior for invalid or ambiguous times at a DST transition is fixed to be really and truly "assume standard time", fixing a bug that has come and gone repeatedly but was back again in 7.4. (There is some ongoing discussion about whether we should raise an error instead, but for the moment I'll make it do what it was previously intended to do.)
* Update comment to point to proper file.Bruce Momjian2004-11-01
|
* I found a corner case in which it is possible for RI_FKey_check's callTom Lane2004-10-30
| | | | | | | | | | | | | | of HeapTupleSatisfiesItself() to trigger a hint-bit update on the tuple: if the row was updated or deleted by a subtransaction of my own transaction that was later rolled back. This cannot occur in pre-8.0 of course, so the hint-bit patch applied a couple weeks ago is OK for existing releases. But for 8.0 it seems we had better fix things so that RI_FKey_check can pass the correct buffer number to HeapTupleSatisfiesItself. Accordingly, add fields to the TriggerData struct to carry the buffer ID(s) for the old and new tuple(s). There are other possible solutions but this one seems cleanest; it will allow other AFTER-trigger functions to safely do tqual.c calls if they want to. Put new fields at end of struct so that there is no API breakage.
* Fix to_number for the case of a trailing S.Tom Lane2004-10-28
| | | | Karel Zak
* When displaying a Var that is a reference to a column of an unnamed join,Tom Lane2004-10-27
| | | | | | | try to display it as a reference to the underlying column instead. This is a legitimate substitution (it wouldn't be for a named join) and it fixes some cases where the display would otherwise be ambiguous. Per example from Sim Zacks.
* Modify hash_create() to elog(ERROR) if an error occurs, rather thanNeil Conway2004-10-25
| | | | | | | | returning a NULL pointer (some callers remembered to check the return value, but some did not -- it is safer to just bail out). Also, cleanup pgstat.c to use elog(ERROR) rather than elog(LOG) followed by exit().
* Add a GUC_SUPERUSER_ONLY flag to mark GUC variables that should not beTom Lane2004-10-22
| | | | | | | | examinable by non-superusers, and use it to protect the recently-added GUC variables for data directory and config files. For now I have only flagged those variables that could be used to deduce something about the server's filesystem layout, but possibly we should also mark vars related to logging settings and other admin-only information?
* Minor code cleanup: hdefault() only ever returned "true", so it may asNeil Conway2004-10-22
| | | | | well be declared to return "void" to save callers the trouble of checking for errors.
* Allow functions returning void or cstring to appear in FROM clause,Tom Lane2004-10-20
| | | | | | to make life cushy for the JDBC driver. Centralize the decision-making that affects this by inventing a get_type_func_class() function, rather than adding special cases in half a dozen places.
* Add a HINT about the likely reason for 'invalid multibyte character for ↵Tom Lane2004-10-19
| | | | locale' failure.
* Fix some typos.Bruce Momjian2004-10-17
|
* Allow background writing to be shut down by setting limit values to zero.Tom Lane2004-10-17
| | | | | | | This does not disable the bgwriter process: it still has to wake up often enough to collect fsync requests from backends in a timely fashion. But it responds to the recent gripe about not being able to prevent the disk from being spun up constantly.
* pg_get_indexdef() didn't do quite the right thing with identifyingTom Lane2004-10-17
| | | | an index's tablespace.
* Make locale_messages_assign() really work on Windows; the prior hackTom Lane2004-10-17
| | | | | | only covered the case of assigning "", and failed to recognize that actually setlocale(LC_MESSAGES,...) does not work at all on this platform. Magnus Hagander, some code prettification by Tom Lane.
* Limit NBuffers and some related values to INT_MAX / BLCKSZ, to preventTom Lane2004-10-16
| | | | | arithmetic overflow during initial sizing calculations. This is not water-tight but it should avoid the grossest sorts of failures.
* Give the ResourceOwner mechanism full responsibility for releasing bufferTom Lane2004-10-16
| | | | | | | | pins at end of transaction, and reduce AtEOXact_Buffers to an Assert cross-check that this was done correctly. When not USE_ASSERT_CHECKING, AtEOXact_Buffers is a complete no-op. This gets rid of an O(NBuffers) bottleneck during transaction commit/abort, which recent testing has shown becomes significant above a few tens of thousands of shared buffers.
* Repair possible failure to update hint bits back to disk, perTom Lane2004-10-15
| | | | | | | | | | http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php. This fix is intended to be permanent: it moves the responsibility for calling SetBufferCommitInfoNeedsSave() into the tqual.c routines, eliminating the requirement for callers to test whether t_infomask changed. Also, tighten validity checking on buffer IDs in bufmgr.c --- several routines were paranoid about out-of-range shared buffer numbers but not about out-of-range local ones, which seems a tad pointless.
* More minor cosmetic improvements:Neil Conway2004-10-13
| | | | | | | | | | - remove another senseless "extern" keyword that was applied to a function definition - change a foo more function signatures from "some_type foo()" to "some_type foo(void)" - rewrite another K&R style function definition - make the type of the "action" function pointer in the KeyWord struct in src/backend/utils/adt/formatting.c more precise
* Message style revisionsPeter Eisentraut2004-10-12
|
* Fix a copy-and-paste error: give a distinct memory context a distinctNeil Conway2004-10-12
| | | | name, mainly for debugging purposes.
* Cosmetic improvements/code cleanup:Neil Conway2004-10-10
| | | | | | | | | | | - replace some function signatures of the form "some_type foo()" with "some_type foo(void)" - replace a few instances of a literal 0 being used as a NULL pointer; there are more instances of this in the code, but I just fixed a few - in src/backend/utils/mb/wstrncmp.c, replace K&R style function declarations with ANSI style, remove use of 'register' keyword - remove an "extern" modifier that was applied to a function definition (rather than a declaration)
* Adjust configuration-files GUC behavior as per my recent proposal.Tom Lane2004-10-09
| | | | | | | | The vars are renamed to data_directory, config_file, hba_file, and ident_file, and are guaranteed to be set to accurate absolute paths during postmaster startup. This commit does not yet do anything about hiding path values from non-superusers.
* Make getpid() use %d consistently for printing.Bruce Momjian2004-10-09
|
* Suppress timezone output on log_line_prefix %t on Win32, because it isBruce Momjian2004-10-09
| | | | too long.
* Whack some sense into the configuration-file-location patch.Tom Lane2004-10-08
| | | | | | | Refactor code into something reasonably understandable, cause use of the feature to not fail in standalone backends or in EXEC_BACKEND case, fix sloppy guc.c table entries, make the documentation minimally usable.
* Do proper testing of CIDR bits against network mask, e.g. don't allow:Bruce Momjian2004-10-08
| | | | | | | | | | test=# select '204.248.199.1/31'::cidr; Previous releases erroneously accepted such addresses. WARN IN RELEASE NOTES Kevin Brintnall
* Change get_rule_expr so that when the input is a List, it displays theTom Lane2004-10-07
| | | | | | | list elements comma-separated instead of barfing. This allows elimination of half a dozen redundant copies of that behavior, and also makes the world safe again for pg_get_expr() applied to pg_index.indexprs, per gripe from Alexander Zhiltsov.
* Adjust comments previously moved to column 1 by pgident.Bruce Momjian2004-10-07
|
* Remove arithmetic operators on the 1-byte-char datatype, as per proposalsTom Lane2004-10-04
| | | | | | | made several times in the past. Add coercion functions between "char" and integer so that a workaround is possible if needed. Initdb forced.
* Suppress getppid test on WIN32, per Dave Page.Tom Lane2004-10-04
|