aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Minor code cleanup: remove no-longer-useful pull_subplans() function,Tom Lane2003-02-04
| | | | | and convert pull_agg_clause() into count_agg_clause(), which is a more efficient way of doing what it's really being used for.
* Detect duplicate aggregate calls and evaluate only one copy. ThisTom Lane2003-02-04
| | | | | speeds up some useful real-world cases like SELECT x, COUNT(*) FROM t GROUP BY x HAVING COUNT(*) > 100.
* #ifdef out stuff that shouldn't be compiled when not USE_SSL.Tom Lane2003-02-03
| | | | Curious that gcc doesn't complain about unreferenced static variables.
* Determine the set of constraints applied to a domain at executorTom Lane2003-02-03
| | | | | | startup, not in the parser; this allows ALTER DOMAIN to work correctly with domain constraint operations stored in rules. Rod Taylor; code review by Tom Lane.
* Don't print NO ACTION foreign key actions in dumps and psql \d.Bruce Momjian2003-02-03
|
* Tweak planner and executor to avoid doing ExecProject() in table scanTom Lane2003-02-03
| | | | | | | | nodes where it's not really necessary. In many cases where the scan node is not the topmost plan node (eg, joins, aggregation), it's possible to just return the table tuple directly instead of generating an intermediate projection tuple. In preliminary testing, this reduced the CPU time needed for 'SELECT COUNT(*) FROM foo' by about 10%.
* Move pg_service.conf.sample to /interfaces/libpq.Bruce Momjian2003-02-03
|
* Change MOVE LAST to MOVE ALL.Bruce Momjian2003-02-03
| | | | Standard says FETCH LAST is after last row, and we don't do that.
* Implement EXPLAIN EXECUTE. By Neil Conway, with some kibitzing fromTom Lane2003-02-02
| | | | Tom Lane.
* Fix nodeUnique to behave correctly when reversing direction after reachingTom Lane2003-02-02
| | | | | either end of subplan results. This prevents misbehavior of cursors on SELECT DISTINCT ... queries. Per bug report 1-Feb-02.
* Remove restriction that cast functions cannot be volatile. ThisTom Lane2003-02-01
| | | | | | restriction was debatable to begin with, but it has now become obvious that it breaks forward-porting of user-defined types; contrib/lo being the most salient example.
* Fix assign_session_authorization() to not be confused by all-numericTom Lane2003-02-01
| | | | user names. Per recent reports.
* Tweak bison build rules so that we get the same error messages fromTom Lane2003-01-31
| | | | | | | | bison 1.875 and later as we did from earlier bison releases. Eventually we will probably want to adopt the newer message spelling ... but not yet. Per recent discussion on pgpatches. Note: I didn't change the build rules for bootstrap, ecpg, or plpgsql grammars, since these do not affect regression test results.
* Allow a time zone to be specified (and silently ignored) in the inputTom Lane2003-01-31
| | | | | | | for type 'time without time zone', as we already did for type 'timestamp without time zone'. This patch was proposed by Tom Lockhart on 7-Nov-02, but he never got around to applying it. Adjust regression tests and documentation to match.
* SPI_exec shouldn't return SPI_OK_SELECT if it hasn't actually returnedTom Lane2003-01-29
| | | | | a tuple table. Fixes core dump in pltcl (and probably other PLs) when executing a query rewritten by a rule. Per bug report from Wolfgang Walter.
* Tweak ArrayCount() to forestall possible access to temp[-1]. ProblemTom Lane2003-01-29
| | | | | | cannot actually happen at present because ArrayCount() is only called on strings beginning with '{', but seems best to prevent it going forward. Per report from Yichen Xie.
* Repair array subscript overrun identified by Yichen Xie. Reduce theTom Lane2003-01-29
| | | | | | | value of MAX_TIME_PRECISION in floating-point-timestamp-storage case from 13 to 10, which is as much as time_out is actually willing to print. (The alternative of increasing the number of digits we are willing to print looks risky; we might find ourselves printing roundoff garbage.)
* Fix array subscript overruns identified by Yichen Xie.Tom Lane2003-01-29
|
* Extend join-selectivity API (oprjoin interface) so that join type isTom Lane2003-01-28
| | | | | | | passed to join selectivity estimators. Make use of this in eqjoinsel to derive non-bogus selectivity for IN clauses. Further tweaking of cost estimation for IN. initdb forced because of pg_proc.h changes.
* Convert variable name to canonical spelling before checking for matchesTom Lane2003-01-28
| | | | | in GUCArrayAdd/GUCArrayDelete. This prevents the multiple-entry bug exhibited by Frank Lupo 28-Jan-2003.
* Revert off setting mention for client_min_messages.Bruce Momjian2003-01-28
| | | | | Set log_min_error_messages to the proper and agreed-upon default, PANIC (off). (BACKPATCH)
* Revert optimizer page count change.Bruce Momjian2003-01-28
|
* Set log_min_error_messages to the proper and agreed-upon default, PANIC (off).Bruce Momjian2003-01-27
| | | | Backpatch to 7.3.X.
* Upgrade cost estimation for joins, per discussion with Bradley Baetz.Tom Lane2003-01-27
| | | | | | | Try to model the effect of rescanning input tuples in mergejoins; account for JOIN_IN short-circuiting where appropriate. Also, recognize that mergejoin and hashjoin clauses may now be more than single operator calls, so we have to charge appropriate execution costs.
* Get rid of last few unadorned 'permission denied' messages.Tom Lane2003-01-27
|
* Include IPv6 addresses in pg_hba.conf even if IPv6 is not supported; atBruce Momjian2003-01-26
| | | | suggestion of Peter.
* Allow the planner to collapse explicit inner JOINs together, rather thanTom Lane2003-01-25
| | | | | | | | | necessarily following the JOIN syntax to develop the query plan. The old behavior is still available by setting GUC variable JOIN_COLLAPSE_LIMIT to 1. Also create a GUC variable FROM_COLLAPSE_LIMIT to control the similar decision about when to collapse sub-SELECT lists into their parent lists. (This behavior existed already, but the limit was always GEQO_THRESHOLD/2; now it's separately adjustable.)
* Where available, use utime() or utimes() to update the file mod timeTom Lane2003-01-25
| | | | | | of the socket file and socket lock file; this should prevent both of them from being removed by even the stupidest varieties of /tmp-cleaning script. Per suggestion from Giles Lean.
* Use stat(2) to probe for existing xlog segments in InstallXLogFileSegment,Tom Lane2003-01-25
| | | | | | | | | rather than actually opening the files. This eliminates some corner cases where the file indeed exists but open() fails for another reason, such as being out of file descriptors. The net reliability gain is probably tiny, since xlog.c is full of other file open calls that will elog(PANIC) if they fail for any reason; but this specific failure mode has been observed in the field, so we may as well fix it.
* Suppress gcc warnings.Tom Lane2003-01-24
|
* Modify planner's implied-equality-deduction code so that when a setTom Lane2003-01-24
| | | | | | | | | | | of known-equal expressions includes any constant expressions (including Params from outer queries), we actively suppress any 'var = var' clauses that are or could be deduced from the set, generating only the deducible 'var = const' clauses instead. The idea here is to push down the restrictions implied by the equality set to base relations whenever possible. Once we have applied the 'var = const' clauses, the 'var = var' clauses are redundant, and should be suppressed both to save work at execution and to avoid double-counting restrictivity.
* Grant options, and cascading revoke. Grant options are allowed only forPeter Eisentraut2003-01-23
| | | | | users right now, not groups. Extension of has_foo_privileges functions to query the grant options. Extension of aclitem type to store grantor.
* Fix obsolete error message (isImmutable doesn't exist).Tom Lane2003-01-23
|
* Change CREATE TABLE AS / SELECT INTO to create the new table with OIDs,Tom Lane2003-01-23
| | | | | for backwards compatibility with pre-7.3 behavior. Per discussion on pgsql-general and pgsql-hackers.
* Fix sloppy comment.Tom Lane2003-01-22
|
* Make estimation of mergejoin scan selectivities more robust, per recentTom Lane2003-01-22
| | | | example from RaÇl GutiÅrrez.
* Improve print_expr() a little. It's still not very bright though.Tom Lane2003-01-22
|
* Implement choice between hash-based and sort-based grouping for doingTom Lane2003-01-22
| | | | DISTINCT processing on the output of an IN sub-select.
* Fix coredump problem in plpgsql's RETURN NEXT. When a SELECT INTOTom Lane2003-01-21
| | | | | | | | that's selecting into a RECORD variable returns zero rows, make it assign an all-nulls row to the RECORD; this is consistent with what happens when the SELECT INTO target is not a RECORD. In support of this, tweak the SPI code so that a valid tuple descriptor is returned even when a SPI select returns no rows.
* Avoid gratuitous variation in spelling of same error message.Tom Lane2003-01-21
|
* IN clauses appearing at top level of WHERE can now be handled as joins.Tom Lane2003-01-20
| | | | | | | | | | There are two implementation techniques: the executor understands a new JOIN_IN jointype, which emits at most one matching row per left-hand row, or the result of the IN's sub-select can be fed through a DISTINCT filter and then joined as an ordinary relation. Along the way, some minor code cleanup in the optimizer; notably, break out most of the jointree-rearrangement preprocessing in planner.c and put it in a new file prep/prepjointree.c.
* Fix parse_agg.c to detect ungrouped Vars in sub-SELECTs; remove codeTom Lane2003-01-17
| | | | | | | that used to do it in planner. That was an ancient kluge that was never satisfactory; errors should be detected at parse time when possible. But at the time we didn't have the support mechanism (expression_tree_walker et al) to make it convenient to do in the parser.
* Adjust API of expression_tree_mutator and query_tree_mutator toTom Lane2003-01-17
| | | | | | simplify callers. It turns out the common case is that the caller does want to recurse into sub-queries, so push support for that into these subroutines.
* Add code to print information about a detected deadlock cycle. TheTom Lane2003-01-16
| | | | | printed data is comparable to what you could read in the pg_locks view, were you fortunate enough to have been looking at it at the right time.
* Ooops, didn't cut-and-paste quite enough code from ResolveNew;Tom Lane2003-01-16
| | | | with result that flatten_join_alias_vars failed to descend into subselects.
* Repair an embarrassingly large number of alphabetization mistakes in theTom Lane2003-01-16
| | | | | | | datetime token tables. Even more embarrassing, the regression tests revealed some of the problems --- but evidently the bogus output wasn't questioned. Add code to postmaster startup to directly check the tables for correct ordering, in hopes of not being embarrassed like this again.
* Add remaining documentation tables to information schema.Peter Eisentraut2003-01-15
|
* Now that switch_outer processing no longer relies on being run afterTom Lane2003-01-15
| | | | | | | join_references(), it's practical to consolidate all join_references() processing into the set_plan_references traversal in setrefs.c. This seems considerably cleaner than the old way where we did it for join quals in createplan.c and for targetlists in setrefs.c.
* More comment cleanups for shared_buffers in postgresql.conf.Bruce Momjian2003-01-15
|
* Update shared_buffer comment in postgresql.conf.Bruce Momjian2003-01-15
|