aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/functions.c
Commit message (Collapse)AuthorAge
...
* Remove dashes in comments that don't need them, rewrap with pgindent.Bruce Momjian2001-03-22
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Clean up handling of tuple descriptors so that result-tuple descriptorsTom Lane2001-01-29
| | | | | | | | allocated by plan nodes are not leaked at end of query. This doesn't really matter for normal queries, but it sure does for queries invoked repetitively inside SQL functions. Clean up some other grotty code associated with tupdescs, and fix a few other memory leaks exposed by tests with simple SQL functions.
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Change SearchSysCache coding conventions so that a reference count isTom Lane2000-11-16
| | | | | | | maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
* Restructure handling of inheritance queries so that they work with outerTom Lane2000-11-12
| | | | | | | | | | | | | | | | | joins, and clean things up a good deal at the same time. Append plan node no longer hacks on rangetable at runtime --- instead, all child tables are given their own RT entries during planning. Concept of multiple target tables pushed up into execMain, replacing bug-prone implementation within nodeAppend. Planner now supports generating Append plans for inheritance sets either at the top of the plan (the old way) or at the bottom. Expanding at the bottom is appropriate for tables used as sources, since they may appear inside an outer join; but we must still expand at the top when the target of an UPDATE or DELETE is an inheritance set, because we actually need a different targetlist and junkfilter for each target table in that case. Fortunately a target table can't be inside an outer join... Bizarre mutual recursion between union_planner and prepunion.c is gone --- in fact, union_planner doesn't really have much to do with union queries anymore, so I renamed it grouping_planner.
* Re-implement LIMIT/OFFSET as a plan node type, instead of a hack inTom Lane2000-10-26
| | | | | | ExecutorRun. This allows LIMIT to work in a view. Also, LIMIT in a cursor declaration will behave in a reasonable fashion, whereas before it was overridden by the FETCH count.
* SQL-language functions are now callable in ordinary fmgr contexts ...Tom Lane2000-08-24
| | | | | | for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
* Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist'Tom Lane2000-08-08
| | | | | | | | from Param nodes, per discussion a few days ago on pghackers. Add new expression node type FieldSelect that implements the functionality where it's actually needed. Clean up some other unused fields in Func nodes as well. NOTE: initdb forced due to change in stored expression trees for rules.
* First stage of reclaiming memory in executor by resetting short-termTom Lane2000-07-12
| | | | | | memory contexts. Currently, only leaks in expressions executed as quals or projections are handled. Clean up some old dead cruft in executor while at it --- unused fields in state nodes, that sort of thing.
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-28
| | | | | | | | | | | | | for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-28
| | | | | | | key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Fix bug noted by Bruce: FETCH in an already-aborted transaction blockTom Lane2000-04-04
| | | | | | | | | | | would crash, due to premature invocation of SetQuerySnapshot(). Clean up problems with handling of multiple queries by splitting pg_parse_and_plan into two routines. The old code would not, for example, do the right thing with END; SELECT... submitted in one query string when it had been in transaction abort state, because it'd decide to skip planning the SELECT before it had executed the END. New arrangement is simpler and doesn't force caller to plan if only parse+rewrite is needed.
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Rip out QueryTreeList structure, root and branch. QuerytreeTom Lane1999-05-13
| | | | | | | | | | lists are now plain old garden-variety Lists, allocated with palloc, rather than specialized expansible-array data allocated with malloc. This substantially simplifies their handling and eliminates several sources of memory leakage. Several basic types of erroneous queries (syntax error, attempt to insert a duplicate key into a unique index) now demonstrably leak zero bytes per query.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Added LIMIT/OFFSET functionality including new regression test for it.Jan Wieck1999-02-08
| | | | | | | Removed CURRENT keyword for rule queries and changed rules regression accordingly. CURRENT has beed announced to disappear in v6.5. Jan
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-03
|
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-27
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* This is the final state of the rule system for 6.4 after theBruce Momjian1998-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch is applied: Rewrite rules on relation level work fine now. Event qualifications on insert/update/delete rules work fine now. I added the new keyword OLD to reference the CURRENT tuple. CURRENT will be removed in 6.5. Update rules can reference NEW and OLD in the rule qualification and the actions. Insert/update/delete rules on views can be established to let them behave like real tables. For insert/update/delete rules multiple actions are supported now. The actions can also be surrounded by parantheses to make psql happy. Multiple actions are required if update to a view requires updates to multiple tables. Regular users are permitted to create/drop rules on tables they have RULE permissions for (DefineQueryRewrite() is now able to get around the access restrictions on pg_rewrite). This enables view creation for regular users too. This required an extra boolean parameter to pg_parse_and_plan() that tells to set skipAcl on all rangetable entries of the resulting queries. There is a new function pg_exec_query_acl_override() that could be used by backend utilities to use this facility. All rule actions (not only views) inherit the permissions of the event relations owner. Sample: User A creates tables T1 and T2, creates rules that log INSERT/UPDATE/DELETE on T1 in T2 (like in the regression tests for rules I created) and grants ALL but RULE on T1 to user B. User B can now fully access T1 and the logging happens in T2. But user B cannot access T2 at all, only the rule actions can. And due to missing RULE permissions on T1, user B cannot disable logging. Rules on the attribute level are disabled (they don't work properly and since regular users are now permitted to create rules I decided to disable them). Rules on select must have exactly one action that is a select (so select rules must be a view definition). UPDATE NEW/OLD rules are disabled (still broken, but triggers can do it). There are two new system views (pg_rule and pg_view) that show the definition of the rules or views so the db admin can see what the users do. They use two new functions pg_get_ruledef() and pg_get_viewdef() that are builtins. The functions pg_get_ruledef() and pg_get_viewdef() could be used to implement rule and view support in pg_dump. PostgreSQL is now the only database system I know, that has rewrite rules on the query level. All others (where I found a rule statement at all) use stored database procedures or the like (triggers as we call them) for active rules (as some call them). Future of the rule system: The now disabled parts of the rule system (attribute level, multiple actions on select and update new stuff) require a complete new rewrite handler from scratch. The old one is too badly wired up. After 6.4 I'll start to work on a new rewrite handler, that fully supports the attribute level rules, multiple actions on select and update new. This will be available for 6.5 so we get full rewrite rule capabilities. Jan
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* Support for subselects.Vadim B. Mikheev1998-02-13
| | | | | | | ExecReScan for nodeAgg, nodeHash, nodeHashjoin, nodeNestloop and nodeResult. Fixed ExecReScan for nodeMaterial. Get rid of #ifdef INDEXSCAN_PATCH. Get rid of ExecMarkPos and ExecRestrPos in nodeNestloop.
* Inline fastgetattr and others so data access does not use functionBruce Momjian1998-01-31
| | | | calls.
* Rename pg_plan and pg_eval to be more meaningful.Bruce Momjian1997-12-11
|
* Break parser functions into smaller files, group together.Bruce Momjian1997-11-25
|
* Inline memset() as MemSet().Bruce Momjian1997-09-18
|
* heapattr functions now return a Datum, not char *.Bruce Momjian1997-09-12
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-08
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-08
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-07
|
* SPI manager.Vadim B. Mikheev1997-08-29
|
* Remove more (void) and fix -Wall warnings.Bruce Momjian1997-08-12
|
* Fixing bug in INDEXSCAN_PATCH:Vadim B. Mikheev1997-01-22
| | | | | | ExecInitIndexScan now works with operands of Param type and (!!!) postquel_execute() now substitutes param values before calling postquel_start().
* Some compile failure fixes from Keith Parks <emkxp01@mtcc.demon.co.uk>Marc G. Fournier1996-11-06
|
* D'Arcy's cleanupsMarc G. Fournier1996-10-26
|
* There is a bug in the function executor. The backend crashes while trying toMarc G. Fournier1996-09-16
| | | | | | | | | | execute an sql function containing an utility command (create, notify, ...). The bug is part in the planner, which returns a number of plans different than the number of commands if there are utility commands in the query, and in part in the function executor which assumes that all commands are normal query commands and causes a SIGSEGV trying to execute commands without plan. Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-09