aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Arrange to emit a description of the current XLOG record as error contextTom Lane2006-03-24
| | | | | | | | | when an error occurs during xlog replay. Also, replace the former risky 'write into a fixed-size buffer with no overflow detection' API for XLOG record description routines; use an expansible StringInfo instead. (The latter accounts for most of the patch bulk.) Qingqing Zhou
* Fix plpgsql to pass only one copy of any given plpgsql variable into a SQLTom Lane2006-03-23
| | | | | | | | | command or expression, rather than one copy for each textual occurrence as it did before. This might result in some small performance improvement, but the compelling reason to do it is that not doing so can result in unexpected grouping failures because the main SQL parser won't see different parameter numbers as equivalent. Add a regression test for the failure case. Per report from Robert Davidson.
* Add error location info to ResTarget parse nodes. Allows error cursor to be ↵Tom Lane2006-03-23
| | | | | | supplied for various mistakes involving INSERT and UPDATE target columns.
* Improve performance of our private version of qsort. Per recent testing,Tom Lane2006-03-21
| | | | | | | | | | | | the logic it contained to switch to insertion sort for near-sorted input was in fact a big loss, because it could fairly easily be fooled into applying insertion sort to large subfiles that weren't all that well ordered. Remove that, and instead add a simple check for already-perfectly-sorted input, as per suggestion from Dann Corbit. This adds at worst O(N*lgN) overhead, and usually far less, while sometimes allowing a subfile sort to finish in O(N) time. Preliminary testing says this is an improvement over the basic Bentley & McIlroy code for many nonrandom inputs, and it costs almost nothing when the input is random.
* Minor refactoring: initialize_SSL() only returns 0, so it should returnNeil Conway2006-03-21
| | | | "void" rather than "int".
* Merge the loading of shared object descriptions with regular descriptions,Alvaro Herrera2006-03-21
| | | | both in code and in the messages emitted to the user.
* Fix psql history handling:Bruce Momjian2006-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 1) Fix the problems with the \s command. > When the saveHistory is executed by the \s command we must not do the > conversion \n -> \x01 (per > http://archives.postgresql.org/pgsql-hackers/2006-03/msg00317.php ) > > 2) Fix the handling of Ctrl+C > > Now when you do > wsdb=# select 'your long query here ' > wsdb-# > and press afterwards the CtrlC the line "select 'your long query here '" > will be in the history > > (partly per > http://archives.postgresql.org/pgsql-hackers/2006-03/msg00297.php ) > > 3) Fix the handling of commands with not closed brackets, quotes, double > quotes. (now those commands are not splitted in parts...) > > 4) Fix the behaviour when SINGLELINE mode is used. (before it was almost > broken ;( Sergey E. Koposov
* Update comment that pgNotify.be_pid is pid of the notifying server process.Bruce Momjian2006-03-20
|
* Fix a few places that were checking for the return value of palloc() to beNeil Conway2006-03-19
| | | | | non-NULL: palloc() ereports on OOM, so we can safely assume it returns a valid pointer.
* Adjust join_1.out to match Windows behavior for new mergejoin regressionTom Lane2006-03-19
| | | | | test, per Dave Page and buildfarm. Perhaps we will need a join_2 instead, but for the moment assume that this test tracks the other diffs.
* The call to DNSServiceRegistrationCreate in postmaster.c does incorrectNeil Conway2006-03-18
| | | | | | | | | byte-swapping on the port number which causes the call to fail on Intel Macs. This patch uses htons() instead of htonl() and fixes this bug. Ashley Clark
* Fix bug introduced into mergejoin logic by performance improvement patch ofTom Lane2006-03-17
| | | | | | | | | | | | | | 2005-05-13. When we find that a new inner tuple can't possibly match any outer tuple (because it contains a NULL), we can't immediately skip the tuple when we are in NEXTINNER state. Doing so can lead to emitting multiple copies of the tuple in FillInner mode, because we may rescan the tuple after returning to a previous marked tuple. Instead, proceed to NEXTOUTER state the same as we used to do. After we've found that there's no need to return to the marked position, we can go to SKIPINNER_ADVANCE state instead of SKIP_TEST when the inner tuple is unmatchable; this preserves the performance improvement. Per bug report from Bruce. I also made a couple of cosmetic code rearrangements and added a regression test for the problem.
* Document long names for format options (plain, tar, custom). They alreadyPeter Eisentraut2006-03-17
| | | | worked and someone asked about them, so we might as well document them.
* Fixed bug 2330: Wrong error code in case of a duplicate keyMichael Meskes2006-03-17
|
* Fix invalid use of #if within a macro, per Laurenz Albe. Also try toTom Lane2006-03-16
| | | | | make the LDAP code's error messages look like they were written by someone who had heard of our style guidelines.
* Clean up representation of function RTEs for functions returning RECORD.Tom Lane2006-03-16
| | | | | | | | | | | | | | | | The original coding stored the raw parser output (ColumnDef and TypeName nodes) which was ugly, bulky, and wrong because it failed to create any dependency on the referenced datatype --- and in fact would not track type renamings and suchlike. Instead store a list of column type OIDs in the RTE. Also fix up general failure of recordDependencyOnExpr to do anything sane about recording dependencies on datatypes. While there are many cases where there will be an indirect dependency (eg if an operator returns a datatype, the dependency on the operator is enough), we do have to record the datatype as a separate dependency in examples like CoerceToDomain. initdb forced because of change of stored rules.
* Fix typo in pgcvslog, used == instead of =.Bruce Momjian2006-03-15
|
* It seems the YYLLOC_DEFAULT macro recommended by the Bison 1.875 manualTom Lane2006-03-14
| | | | just doesn't work with Bison 2.0 ... fix it ...
* Missed this file in previous commit :-(Tom Lane2006-03-14
|
* Improve parser so that we can show an error cursor position for errorsTom Lane2006-03-14
| | | | | | | | | | | during parse analysis, not only errors detected in the flex/bison stages. This is per my earlier proposal. This commit includes all the basic infrastructure, but locations are only tracked and reported for errors involving column references, function calls, and operators. More could be done later but this seems like a good set to start with. I've also moved the ReportSyntaxErrorPosition logic out of psql and into libpq, which should make it available to more people --- even within psql this is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
* Fix a number of syntax errors in contrib modules' uninstall scripts.Neil Conway2006-03-13
| | | | | | | | | Most of the changes add the mandatory USING clause to DROP OPERATOR CLASS statements. DROP TYPE is now DROP TYPE CASCADE; without CASCADE a DROP TYPE fails due to the circular dependency on the type's I/O functions. The DROP FUNCTION statements for the I/O functions have been removed, as DROP TYPE CASCADE removes them automatically. Patch from Michael Fuhr.
* Remove Christof Petig copyright. He already approved removal from anBruce Momjian2006-03-11
| | | | include file in the same area,.
* Remove copyright notices from Jan (per author approval), and those filesBruce Momjian2006-03-11
| | | | derived from Jan's.
* Add CVS tag lines to files that were lacking them.Bruce Momjian2006-03-11
|
* Remove a few places that attempted to define INT_MAX, SCHAR_MAX, andNeil Conway2006-03-11
| | | | | | similar constants if they were not previously defined. All these constants must be defined by limits.h according to C89, so we can safely assume they are present.
* Recent changes in memory management in tuplesort.c had a problem: theTom Lane2006-03-10
| | | | | | | | | | | | case where we run low on array slots before we run low on memory is much more probable than I had thought, and so it's important to treat each tape fairly in that case. To fix this, track per-tape slot allocations just like we track per-tape space allocation. Also, in the FINALMERGE code path avoid scanning all the input tapes when we really only need to read from one. This should fix poor behavior with very large work_mem as exhibited by Stefan Kaltenbrunner. I didn't do anything about putting an upper bound on the number of tapes, but maybe we should still consider that.
* Add a CHECK_FOR_INTERRUPTS() in _bt_buildadd(). This fixes problemTom Lane2006-03-10
| | | | | with not responding to query cancel during the last stage of btree index creation.
* Implement 4 new aggregate functions from SQL2003. Specifically: var_pop(),Neil Conway2006-03-10
| | | | | | | | | | | | | var_samp(), stddev_pop(), and stddev_samp(). var_samp() and stddev_samp() are just renamings of the historical Postgres aggregates variance() and stddev() -- the latter names have been kept for backward compatibility. This patch includes updates for the documentation and regression tests. The catversion has been bumped. NB: SQL2003 requires that DISTINCT not be specified for any of these aggregates. Per discussion on -patches, I have NOT implemented this restriction: if the user asks for stddev(DISTINCT x), presumably they know what they are doing.
* Remove unintened change to pg_proc.h.Bruce Momjian2006-03-10
|
* Make $PostgreSQL CVS tags consistent for SGML files.Bruce Momjian2006-03-10
|
* Fix order of linking of libxslt and libxml2, per Dave Page.Tom Lane2006-03-10
|
* Add a CHECK_FOR_INTERRUPTS() to the loop in ExecMakeTableFunctionResult.Tom Lane2006-03-10
| | | | Otherwise you can't cancel queries like select ... from generate_series(1,1000000).
* Remove Jan Wieck's name from copyrights, and put in standardBruce Momjian2006-03-09
| | | | boilerplate, with approval of author.
* Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT.Tom Lane2006-03-08
|
* Remove Christof Petig copyright on include file, per author request.Bruce Momjian2006-03-08
|
* Tweak trace_sort code to show the merge order (number of active inputTom Lane2006-03-08
| | | | | tapes) for each merge step. This will give us some idea of how effective the merge distribution algorithm is.
* Update pltcl expected file for E''.Bruce Momjian2006-03-08
|
* Adjust plpython for escape_string_warning.Bruce Momjian2006-03-08
|
* Adjust PL regression tests for escape_string_warning.Bruce Momjian2006-03-08
|
* Update /contrib regression tests for escape_string_warning.Bruce Momjian2006-03-08
|
* Further examination of ltsReleaseBlock usage shows that it's got aTom Lane2006-03-07
| | | | | | | | | | | | | | | | | performance issue during regular merge passes not only the 'final merge' case. The original design contemplated that there would never be more than about one free block per 'tape', hence no need for an efficient method of keeping the free blocks sorted. But given the later addition of merge preread behavior in tuplesort.c, there is likely to be about work_mem worth of free blocks, which is not so small ... and for that matter the number of tapes isn't necessarily small anymore either. So we'd better get rid of the assumption entirely. Instead, I'm assuming that the usage pattern will involve alternation between merge preread and writing of a new run. This makes it reasonable to just add blocks to the list without sorting during successive ltsReleaseBlock calls, and then do a qsort() when we start getting ltsGetFreeBlock() calls. Experimentation seems to confirm that there aren't many qsort calls relative to the number of ltsReleaseBlock/ltsGetFreeBlock calls.
* Repair old performance bug in tuplesort.c/logtape.c. In the case whereTom Lane2006-03-07
| | | | | | | | we are doing the final merge pass on-the-fly, and not writing the data back onto a 'tape', the number of free blocks in the tape set will become large, leading to a lot of time wasted in ltsReleaseBlock(). There is really no need to track the free blocks anymore in this state, so add a simple shutoff switch. Per report from Stefan Kaltenbrunner.
* Turn off zero_damaged_pages in the right place (ie, in the autovacTom Lane2006-03-07
| | | | | process not in the postmaster) and with the right GucSource (needs to be a nontransactional source since we've not started an xact yet).
* Use SetConfigOption() to turn off "zero_damaged_pages" in autovacuum.Bruce Momjian2006-03-07
|
* Back out comment update about sighup, original was accurate.Bruce Momjian2006-03-07
|
* Properly set "escape_string_warning" to default to true.Bruce Momjian2006-03-07
|
* Make all our flex and bison files use %option prefix or %name-prefixTom Lane2006-03-07
| | | | | | (respectively) to rename yylex and related symbols. Some were doing it this way already, while others used not-too-reliable sed hacks in the Makefiles. It's all nice and consistent now.
* Remove the stub support we had for UNION JOIN; per discussion, this isTom Lane2006-03-07
| | | | | | not likely ever to be implemented seeing it's been removed from SQL2003. This allows getting rid of the 'filter' version of yylex() that we had in parser.c, which should save at least a few microseconds in parsing.
* 'make clean' should NOT remove *~ files.Tom Lane2006-03-07
|
* SGML typo fix.Bruce Momjian2006-03-06
|