aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Make it possible to run initdb from an admin account on Windows,Tom Lane2006-02-10
| | | | | | by giving up admin privileges (only works if newer than NT4). Magnus
* Enable pg_ctl to give up admin privileges when starting the server underTom Lane2006-02-10
| | | | | | Windows (if newer than NT4, else works same as before). Magnus
* Check that SID is enabled while checking for Windows admin privileges.Tom Lane2006-02-10
| | | | Magnus
* Change search for default operator classes so that it examines all opclassesTom Lane2006-02-10
| | | | | | | | | | regardless of the current schema search path. Since CREATE OPERATOR CLASS only allows one default opclass per datatype regardless of schemas, this should have minimal impact, and it fixes problems with failure to find a desired opclass while restoring dump files. Per discussion at http://archives.postgresql.org/pgsql-hackers/2006-02/msg00284.php. Remove now-redundant-or-unused code in typcache.c and namespace.c, and backpatch as far as 8.0.
* Fix psql after newline patch for calloc(0).Bruce Momjian2006-02-10
| | | | Kris Jurka
* Allow psql multi-line column values to align in the proper columnsBruce Momjian2006-02-10
| | | | | | | | | | | | | | | | | | | | | | | If the second output column value is 'a\nb', the 'b' should appear in the second display column, rather than the first column as it does now. Change libpq's PQdsplen() to return more useful values. > Note: this changes the PQdsplen function, it can now return zero or > minus one which was not possible before. It doesn't appear anyone is > actually using the functions other than psql but it is a change. The > functions are not actually documentated anywhere so it's not like we're > breaking a defined interface. The new semantics follow the Unicode > standard. BACKWARD COMPATIBLE CHANGE. The only user-visible change I saw in the regression tests is that a SELECT * on a table where all the columns have been dropped doesn't return a blank line like before. This seems like a step forward. Martijn van Oosterhout
* This fixes pg_dump so that when using the '-O' no owners option it doesBruce Momjian2006-02-09
| | | | | | | | | | | | | | | | | | | | | not print the owner name in the object comment. eg: -- -- Name: actor; Type: TABLE; Schema: public; Owner: chriskl; Tablespace: -- Becomes: -- -- Name: actor; Type: TABLE; Schema: public; Owner: -; Tablespace: -- This makes it far easier to do 'user independent' dumps. Especially for distribution to third parties. Christopher Kings-Lynne
* Provide the libpq error message when PQputline or PQendcopy fails.Tom Lane2006-02-09
|
* Use "bitwise" rather than "binary for AND/OR descriptions in \d, toBruce Momjian2006-02-09
| | | | match SGML documentation.
* C++ comments are verboten. Per gripe from Kris Jurka.Tom Lane2006-02-09
|
* Reject out-of-range dates in date_in().Tom Lane2006-02-09
| | | | Kris Jurka
* Fix broken non-YYDEBUG case.Tom Lane2006-02-09
|
* Added just another test case.Michael Meskes2006-02-08
| | | | | | | Fixed missing continuation line character. Do not translate $-quoting. Bit field notation belongs to a variable not a variable list. Output of line number only done by one function.
* Remove ancient hack to work around a peculiarity of libcurses on HPUX.Tom Lane2006-02-07
| | | | | Since we now use libtermcap in preference to libcurses, no need for hack anymore.
* Source code cleanup.Bruce Momjian2006-02-07
|
* I think that NUMERIC datatype has a problem in the performance thatBruce Momjian2006-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the format on Tuple(Numeric) and the format to calculate(NumericVar) are different. I understood that to reduce I/O. However, when many comparisons or calculations of NUMERIC are executed, the conversion of Numeric and NumericVar becomes a bottleneck. It is profile result when "create index on NUMERIC column" is executed: % cumulative self self total time seconds seconds calls s/call s/call name 17.61 10.27 10.27 34542006 0.00 0.00 cmp_numerics 11.90 17.21 6.94 34542006 0.00 0.00 comparetup_index 7.42 21.54 4.33 71102587 0.00 0.00 AllocSetAlloc 7.02 25.64 4.09 69084012 0.00 0.00 set_var_from_num 4.87 28.48 2.84 69084012 0.00 0.00 alloc_var 4.79 31.27 2.79 142205745 0.00 0.00 AllocSetFreeIndex 4.55 33.92 2.65 34542004 0.00 0.00 cmp_abs 4.07 36.30 2.38 71101189 0.00 0.00 AllocSetFree 3.83 38.53 2.23 69084012 0.00 0.00 free_var The create index command executes many comparisons of Numeric values. Functions other than comparetup_index spent a lot of cycles for conversion from Numeric to NumericVar. An attached patch enables the comparison of Numeric values without executing conversion to NumericVar. The execution time of that SQL becomes half. o Test SQL (index_test table has 1,000,000 tuples) create index index_test_idx on index_test(num_col); o Test results (executed the test five times) (1)PentiumIII original: 39.789s 36.823s 36.737s 37.752s 37.019s patched : 18.560s 19.103s 18.830s 18.408s 18.853s 4.07 36.30 2.38 71101189 0.00 0.00 AllocSetFree 3.83 38.53 2.23 69084012 0.00 0.00 free_var The create index command executes many comparisons of Numeric values. Functions other than comparetup_index spent a lot of cycles for conversion from Numeric to NumericVar. An attached patch enables the comparison of Numeric values without executing conversion to NumericVar. The execution time of that SQL becomes half. o Test SQL (index_test table has 1,000,000 tuples) create index index_test_idx on index_test(num_col); o Test results (executed the test five times) (1)PentiumIII original: 39.789s 36.823s 36.737s 37.752s 37.019s patched : 18.560s 19.103s 18.830s 18.408s 18.853s (2)Pentium4 original: 16.349s 14.997s 12.979s 13.169s 12.955s patched : 7.005s 6.594s 6.770s 6.740s 6.828s (3)Itanium2 original: 15.392s 15.447s 15.350s 15.370s 15.417s patched : 7.413s 7.330s 7.334s 7.339s 7.339s (4)Ultra Sparc original: 64.435s 59.336s 59.332s 58.455s 59.781s patched : 28.630s 28.666s 28.983s 28.744s 28.595s Atsushi Ogawa
* Make --version option print fixed program name.Peter Eisentraut2006-02-07
|
* Fix HTML alignment in PQprint.Bruce Momjian2006-02-07
| | | | Christoph Zwerschke
* Improve the tests to see if ScalarArrayOpExpr is strict. Original codingTom Lane2006-02-06
| | | | | | would basically punt in all cases for 'foo <> ALL (array)', which resulted in a performance regression for NOT IN compared to what we were doing in 8.1 and before. Per report from Pavel Stehule.
* Fix PQprint HTML tag, "centre" -> "center".Bruce Momjian2006-02-06
|
* Fix pg_restore to properly discard COPY data when trying to continueTom Lane2006-02-05
| | | | | | | after an error in a COPY statement. Formerly it thought the COPY data was SQL commands, and got quite confused. Stephen Frost
* Improve my initial, rather hacky implementation of joins to appendTom Lane2006-02-05
| | | | | | | | relations: fix the executor so that we can have an Append plan on the inside of a nestloop and still pass down outer index keys to index scans within the Append, then generate such plans as if they were regular inner indexscans. This avoids the need to evaluate the outer relation multiple times.
* Fix constraint exclusion to work in inherited UPDATE/DELETE queriesTom Lane2006-02-04
| | | | | | | | | ... in fact, it will be applied now in any query whatsoever. I'm still a bit concerned about the cycles that might be expended in failed proof attempts, but given that CE is turned off by default, it's the user's choice whether to expend those cycles or not. (Possibly we should change the simple bool constraint_exclusion parameter to something more fine-grained?)
* Added C bit fields to ecpg parserMichael Meskes2006-02-04
| | | | | | Added some default rules to lexer Added log output to prepare statement Added some more stuff to a test case
* DROP IF EXISTS for ROLE/USER/GROUPAndrew Dunstan2006-02-04
|
* Issue a warning if a change-on-restart-only postgresql.conf value isPeter Eisentraut2006-02-04
| | | | modified and the server config files are reloaded
* In ecpg, automatically double single quotes in $$ strings becauseBruce Momjian2006-02-04
| | | | | | | internally $$ strings are converted to single-quote strings. In ecpg, output newlines in commands using standard C escapes, rather than using literal newlines, which is not portable.
* Update Makefile for new thread_test location.Bruce Momjian2006-02-04
|
* Move thread_test directory from /tools to /test so source-only tarballsBruce Momjian2006-02-04
| | | | have the directory for the configure test.
* Teach planner to convert simple UNION ALL subqueries into append relations,Tom Lane2006-02-03
| | | | | | | | | thereby sharing code with the inheritance case. This puts the UNION-ALL-view approach to partitioned tables on par with inheritance, so far as constraint exclusion is concerned: it works either way. (Still need to update the docs to say so.) The definition of "simple UNION ALL" is a little simpler than I would like --- basically the union arms can only be SELECT * FROM foo --- but it's good enough for partitioned-table cases.
* Update tested AIX memset platforms.Bruce Momjian2006-02-03
|
* Allow MEMSET_LOOP_LIMIT to be set on a per-platform basis, and turn offBruce Momjian2006-02-03
| | | | | | | MemSet on AIX by setting MEMSET_LOOP_LIMIT to zero. Add optimization to skip MemSet tests in MEMSET_LOOP_LIMIT == 0 case and just call memset() directly.
* Update random() usage so ranges are inclusive/exclusive as required.Bruce Momjian2006-02-03
|
* Prevent COPY from using newline or carriage return as delimiter or null.Bruce Momjian2006-02-03
| | | | | | Disallow backslash as the delimiter in non-CVS mode. David Fetter
* Improve tab whitespace in file.Bruce Momjian2006-02-03
| | | | Add comment about $$ and '' SCONST strings.
* More spacing cleanups.Bruce Momjian2006-02-02
|
* Source code alignment fixes for preproc.y.Bruce Momjian2006-02-01
|
* More alignment improvements.Bruce Momjian2006-02-01
|
* Make pgc.l source code alignment consistent.Bruce Momjian2006-02-01
|
* Add code comment about Linux stack randomization and shared memory.Bruce Momjian2006-02-01
|
* Fix const cast in get_progname().Bruce Momjian2006-02-01
| | | | Backpatch.
* Set progname early in the postmaster/postgres binary, rather than doingBruce Momjian2006-02-01
| | | | | | | | | | it later. This fixes a problem where EXEC_BACKEND didn't have progname set, causing a segfault if log_min_messages was set below debug2 and our own snprintf.c was being used. Also alway strdup() progname. Backpatch to 8.1.X and 8.0.X.
* Allow %TYPE to be used with SETOF, per gripe from Murat Tasan.Tom Lane2006-01-31
|
* Restructure planner's handling of inheritance. Rather than processingTom Lane2006-01-31
| | | | | | | | | | | | | inheritance trees on-the-fly, which pretty well constrained us to considering only one way of planning inheritance, expand inheritance sets during the planner prep phase, and build a side data structure that can be consulted later to find which RTEs are members of which inheritance sets. As proof of concept, use the data structure to plan joins against inheritance sets more efficiently: we can now use indexes on the set members in inner-indexscan joins. (The generated plans could be improved further, but it'll take some executor changes.) This data structure will also support handling UNION ALL subqueries in the same way as inheritance sets, but that aspect of it isn't finished yet.
* Fix ALTER COLUMN TYPE bug: it sometimes tried to drop UNIQUE or PRIMARY KEYTom Lane2006-01-30
| | | | | constraints before FOREIGN KEY constraints that depended on them. Originally reported by Neil Conway on 29-Jun-2005. Patch by Nakano Yoshihisa.
* When building a bitmap scan, must copy the bitmapqualorig expression treeTom Lane2006-01-29
| | | | | | | | to avoid sharing substructure with the lower-level indexquals. This is currently only an issue if there are SubPlans in the indexquals, which is uncommon but not impossible --- see bug #2218 reported by Nicholas Vinen. We use the same kluge for indexqual vs indexqualorig in the index scans themselves ... would be nice to clean this up someday.
* Fix Assert that's no longer correct now that RowCompareExpr is indexable.Tom Lane2006-01-29
|
* Fix code that checks to see if an index can be considered to match the query'sTom Lane2006-01-29
| | | | | | | | | requested sort order. It was assuming that build_index_pathkeys always generates a pathkey per index column, which was not true if implied equality deduction had determined that two index columns were effectively equated to each other. Simplest fix seems to be to install an option that causes build_index_pathkeys to support this behavior as well as the original one. Per report from Brian Hirt.
* Undo perl's nasty locale setting on Windows. Since we can't do that asAndrew Dunstan2006-01-28
| | | | | elsewhere by setting the environment appropriately, we make perl do it right after interpreter startup by calling its POSIX::setlocale().
* Per a bug report from Theo Schlossnagle, plperl_return_next() leaksNeil Conway2006-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | memory in the executor's per-query memory context. It also inefficient: it invokes get_call_result_type() and TupleDescGetAttInMetadata() for every call to return_next, rather than invoking them once (per PL/Perl function call) and memoizing the result. This patch makes the following changes: - refactor the code to include all the "per PL/Perl function call" data inside a single struct, "current_call_data". This means we don't need to save and restore N pointers for every recursive call into PL/Perl, we can just save and restore one. - lookup the return type metadata needed by plperl_return_next() once, and then stash it in "current_call_data", so as to avoid doing the lookup for every call to return_next. - create a temporary memory context in which to evaluate the return type's input functions. This memory context is reset for each call to return_next. The patch appears to fix the memory leak, and substantially reduces the overhead imposed by return_next.