aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAge
* Adjust Tcl-related code to compile cleanly with Tcl 8.4 (add const modifiers asTom Lane2002-12-30
| | | | needed). Some desultory const-ification of SPI interface to support this.
* Point does not return a center of lseg.Tom Lane2002-12-30
| | | | Kenji Sugita
* Trivial patch to increase max_fsm_pages as per earlier discussion.Bruce Momjian2002-12-27
| | | | Philip Warner
* To suppress memory leakage in long-lived Lists, lremove() should pfreeTom Lane2002-12-17
| | | | | the cons cell it's deleting from the list. Do this, and fix a few callers that were bogusly assuming it wouldn't free the cons cell.
* Fix ALTER TABLE ADD COLUMN to disallow the same column types that areTom Lane2002-12-16
| | | | | | | | disallowed by CREATE TABLE (eg, pseudo-types); also disallow these types from being introduced by the range-function syntax. While at it, allow CREATE TABLE to create zero-column tables, per recent pghackers discussion. I am back-patching this into 7.3 since failure to disallow pseudo-types is arguably a security hole.
* Code review for palloc0 patch --- avoid dangerous and unnecessaryTom Lane2002-12-16
| | | | | | | | practice of evaluating MemSet's arguments multiple times, except for the special case of newNode(), where we can assume the argument is a constant sizeof() operator. Also, add GetMemoryChunkContext() to mcxt.c's API, in preparation for fixing recent GEQO breakage.
* Tweak default memory context allocation policy so that a context is notTom Lane2002-12-15
| | | | | | | | | given any malloc block until something is first allocated in it; but thereafter, MemoryContextReset won't release that first malloc block. This preserves the quick-reset property of the original policy, without forcing 8K to be allocated to every context whether any of it is ever used or not. Also, remove some more no-longer-needed explicit freeing during ExecEndPlan.
* Clean up plantree representation of SubPlan-s --- SubLink does not appearTom Lane2002-12-14
| | | | | | | | in the planned representation of a subplan at all any more, only SubPlan. This means subselect.c doesn't scribble on its input anymore, which seems like a good thing; and there are no longer three different possible interpretations of a SubLink. Simplify node naming and improve comments in primnodes.h. No change to stored rules, though.
* Phase 3 of read-only-plans project: ExecInitExpr now builds expressionTom Lane2002-12-13
| | | | | | | execution state trees, and ExecEvalExpr takes an expression state tree not an expression plan tree. The plan tree is now read-only as far as the executor is concerned. Next step is to begin actually exploiting this property.
* Guard against overrunning CTZName buffer when TZ is bogus.Tom Lane2002-12-12
|
* Phase 2 of read-only-plans project: restructure expression-tree nodesTom Lane2002-12-12
| | | | | | | | | so that all executable expression nodes inherit from a common supertype Expr. This is somewhat of an exercise in code purity rather than any real functional advance, but getting rid of the extra Oper or Func node formerly used in each operator or function call should provide at least a little space and speed improvement. initdb forced by changes in stored-rules representation.
* Fix Latin9/Unicode conversion by selecting the right table.Peter Eisentraut2002-12-09
|
* Attached are two small patches to expose md5 as a user function -- includingBruce Momjian2002-12-06
| | | | | | | | documentation and regression test mods. It seemed small and unobtrusive enough to not require a specific proposal on the hackers list -- but if not, let me know and I'll make a pitch. Otherwise, if there are no objections please apply. Joe Conway
* As far as I figured from the source code this function only deals withBruce Momjian2002-12-05
| | | | | | | | cleaning up locale names and nothing else. Since all the locale names are in plain ASCII I think it will be safe to use ASCII-only lower-case conversion. Nicolai Tufar
* Phase 1 of read-only-plans project: cause executor state nodes to pointTom Lane2002-12-05
| | | | | | | | | | to plan nodes, not vice-versa. All executor state nodes now inherit from struct PlanState. Copying of plan trees has been simplified by not storing a list of SubPlans in Plan nodes (eliminating duplicate links). The executor still needs such a list, but it can build it during ExecutorStart since it has to scan the plan tree anyway. No initdb forced since no stored-on-disk structures changed, but you will need a full recompile because of node-numbering changes.
* More cleanup of userid to be AclId rather than Oid.Bruce Momjian2002-12-05
|
* Make usesysid consistently int4, not oid.Bruce Momjian2002-12-04
| | | | | | Catalog patch from Alvaro Herrera for same. catversion updated. initdb required.
* Repair core dump when trying to delete an entry from an already-NULLTom Lane2002-12-02
| | | | datconfig or useconfig field. Per report from Dustin Sallings.
* Teach planner to expand sufficiently simple SQL-language functionsTom Lane2002-12-01
| | | | | | | | ('SELECT expression') inline, like macros, during the constant-folding phase of planning. The actual expansion is not difficult, but checking that we're not changing the semantics of the call turns out to be more subtle than one might think; in particular must pay attention to permissions issues, strictness, and volatility.
* Tighten selection of equality and ordering operators for groupingTom Lane2002-11-29
| | | | | | | operations: make sure we use operators that are compatible, as determined by a mergejoin link in pg_operator. Also, add code to planner to ensure we don't try to use hashed grouping when the grouping operators aren't marked hashable.
* Repair prehistoric logic error in lseg_eq and lseg_ne.Tom Lane2002-11-29
|
* Use Params, rather than run-time-modified Const nodes, to handleTom Lane2002-11-26
| | | | | | | sublink results and COPY's domain constraint checking. A Const that isn't really constant is just a Bad Idea(tm). Remove hacks in parse_coerce and other places that were needed because of the former klugery.
* Guard against 0 length string encoding conversion case.Tatsuo Ishii2002-11-26
|
* Remove unused constisset and constiscast fields of Const nodes. CleanTom Lane2002-11-25
| | | | up code and documentation associated with Param nodes.
* This patch implements FOR EACH STATEMENT triggers, per my email toBruce Momjian2002-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -hackers a couple days ago. Notes/caveats: - added regression tests for the new functionality, all regression tests pass on my machine - added pg_dump support - updated PL/PgSQL to support per-statement triggers; didn't look at the other procedural languages. - there's (even) more code duplication in trigger.c than there was previously. Any suggestions on how to refactor the ExecXXXTriggers() functions to reuse more code would be welcome -- I took a brief look at it, but couldn't see an easy way to do it (there are several subtly-different versions of the code in question) - updated the documentation. I also took the liberty of removing a big chunk of duplicated syntax documentation in the Programmer's Guide on triggers, and moving that information to the CREATE TRIGGER reference page. - I also included some spelling fixes and similar small cleanups I noticed while making the changes. If you'd like me to split those into a separate patch, let me know. Neil Conway
* Fix breakage in new-in-7.3 timetz_zone() function: was giving randomTom Lane2002-11-21
| | | | | | results due to doing arithmetic on uninitialized values. Add some documentation about the AT TIME ZONE construct. Update some other date/time documentation that seemed out of date for 7.3.
* Code review for superuser_reserved_connections patch. Don't try to doTom Lane2002-11-21
| | | | | | database access outside a transaction; revert bogus performance improvement in SIBackendInit(); improve comments; add documentation (this part courtesy Neil Conway).
* Finish implementation of hashed aggregation. Add enable_hashagg GUCTom Lane2002-11-21
| | | | | | parameter to allow it to be forced off for comparison purposes. Add ORDER BY clauses to a bunch of regression test queries that will otherwise produce randomly-ordered output in the new regime.
* Add an at-least-marginally-plausible method of estimating the numberTom Lane2002-11-19
| | | | | | of groups produced by GROUP BY. This improves the accuracy of planning estimates for grouped subselects, and is needed to check whether a hashed aggregation plan risks memory overflow.
* Reduce need for palloc/pfree overhead in varstr_cmp() by using fixed-sizeTom Lane2002-11-17
| | | | buffers on stack for short strings.
* Add relcache support for system catalogs with attnotnull columns.Tom Lane2002-11-15
| | | | | | | | The code was not making TupleConstr structs for such catalogs in several places; with the consequence that the not-null constraint wasn't actually enforced. With this change, INSERT INTO pg_proc VALUES('sdf'); generates a 'Fail to add null value' error instead of a core dump.
* Add DOMAIN check constraints.Bruce Momjian2002-11-15
| | | | Rod Taylor
* Add checkpoint_warning to warn of excessive checkpoints caused by tooBruce Momjian2002-11-15
| | | | few WAL files.
* Rename hostname_lookup to log_hostname.Bruce Momjian2002-11-15
|
* Rename show_source_port to log_source_port.Bruce Momjian2002-11-15
|
* Rename show_btree_build_stats to log_btree_build_statsBruce Momjian2002-11-15
|
* Rename:Bruce Momjian2002-11-15
| | | | | | | | | | | | | | ! #show_parser_stats = false ! #show_planner_stats = false ! #show_executor_stats = false ! #show_statement_stats = false TO: ! #log_parser_stats = false ! #log_planner_stats = false ! #log_executor_stats = false ! #log_statement_stats = false
* Rename server_min_messages to log_min_messages. Part of consolidationBruce Momjian2002-11-14
| | | | of log_ settings.
* Allow +1300 as a numeric timezone specifier; we already accept FJST as ↵Tom Lane2002-11-13
| | | | meaning +1300.
* Add new palloc0 call as merge of palloc and MemSet(0).Bruce Momjian2002-11-13
|
* Split MemSet into three parts to constant comparisons can be optimizedBruce Momjian2002-11-13
| | | | away by the compiler; used by palloc0.
* Fix broken GB18030 <--> UTF-8 conversion mapTatsuo Ishii2002-11-12
|
* Remove NO_MKTIME_BEFORE_1970. I had speculated that it was not neededTom Lane2002-11-12
| | | | | | anymore given the mktime() workaround now done in DetermineLocalTimeZone. This has now been confirmed by Robert Bruccoleri for Irix, and I'm going to extrapolate to AIX as well.
* Back out use of palloc0 in place if palloc/MemSet. Seems constant lenBruce Momjian2002-11-11
| | | | to MemSet is a performance boost.
* Merge palloc()/MemSet(0) calls into a single palloc0() call.Bruce Momjian2002-11-10
|
* Add palloc0 function to inline MemSet for newNode call.Bruce Momjian2002-11-10
|
* This patch removes a bunch of superfluous #include directives: ifBruce Momjian2002-11-08
| | | | | | | | postgres.h or c.h includes a system header (such as stdio.h or stdlib.h), there's no need to specifically include it in any of the .c files in the backend. Neil Conway
* Replace imprecise value of PI with a better one, and tweak circle_polyTom Lane2002-11-08
| | | | | | in hopes of reducing platform-to-platform variations in its results. This will cause the geometry regression test to start failing on some platforms. I plan to update the test later today.
* Add extra_float_digits GUC parameter to allow adjustment of displayedTom Lane2002-11-08
| | | | | | | precision for float4, float8, and geometric types. Set it in pg_dump so that float data can be dumped/reloaded exactly (at least on platforms where the float I/O support is properly implemented). Initial patch by Pedro Ferreira, some additional work by Tom Lane.
* The "Allow easy display of usernames in a group (pg_hba.conf uses groupsBruce Momjian2002-11-08
| | | | | | | | | | | | | | | | now)" item on the open items, and subsequent plpgsql function I sent in, made me realize it was too hard to get the upper and lower bound of an array. The attached creates two functions that I think will be very useful when combined with the ability of plpgsql to return sets. array_lower(array, dim_num) - and - array_upper(array, dim_num) They return the value (as an int) of the upper and lower bound of the requested dim in the provided array. Joe Conway