aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.c
Commit message (Collapse)AuthorAge
...
* Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.Tom Lane2000-08-03
| | | | | | | | | These two routines will now ALWAYS elog() on failure, whether you ask for a lock or not. If you really want to get a NULL return on failure, call the new routines heap_open_nofail()/heap_openr_nofail(). By my count there are only about three places that actually want that behavior. There were rather more than three places that were missing the check they needed to make under the old convention :-(.
* More functions updated to new fmgr style --- money, name, tid datatypes.Tom Lane2000-08-03
| | | | | We're reaching the mopup stage here (good thing too, this is getting tedious).
* bpchar, varchar, bytea, numeric are toastable --- if you initdb, whichTom Lane2000-07-29
| | | | | | I did not force. I marked numeric as compressable-but-not-move-off-able, partly to test that storage mode and partly because I've got doubts that numerics are large enough to need external storage.
* Clean up memory-context stuff, other minor infelicities.Tom Lane2000-07-03
|
* Use a private memory context to store rule information in each relcacheTom Lane2000-06-30
| | | | | | | | | | | | | | entry that has rules. This allows us to release the rule parsetrees on relcache flush without needing a working freeObject() routine. Formerly, the rule trees were leaked permanently at relcache flush. Also, clean up handling of rule creation and deletion --- there was not sufficient locking of the relation being modified, and there was no reliable notification of other backends that a relcache reload was needed. Also, clean up relcache.c code so that scans of system tables needed to load a relcache entry are done in the caller's memory context, not in CacheMemoryContext. This prevents any un-pfreed memory from those scans from becoming a permanent memory leak.
* 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.
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-08
|
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-30
|
* Second round of fmgr changes: triggers are now invoked in new style,Tom Lane2000-05-29
| | | | CurrentTriggerData is history.
* Miscellaneous cleanups of places that needed to account for newTom Lane2000-05-28
| | | | pg_language entries.
* 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.
* Show failing OID in 'cache lookup failed' messages.Tom Lane2000-04-16
|
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Changed execution time of ON <event> RESTRICT referentialJan Wieck2000-02-29
| | | | | | | integrity triggers to after statement allways. Ignores deferred state now, closer to SQL3 semantics. Jan
* Implement reindex commandHiroshi Inoue2000-02-18
|
* 2. trigger.c fails to compile due to a syntax error. It containsBruce Momjian2000-02-13
| | | | | | | | | | | | | | a switch statement that has an empty default label. A label of a switch statement must be followed by a statement (or a label which is followed by a statement (or a label which ...)). 3. Files include stringinfo.h failed to compile. The macro, 'appendStringInfoCharMacro' is implemented with a '?:' operation that returns a void expression for the true part and a char expresion for the false part. Both the true and false parts of the '?:' oper- ator must return the same type. Billy G. Allie
* Removed special hack causing ON UPDATE NO ACTION trigger toJan Wieck2000-02-06
| | | | | | be suppressed. Jan
* Small bugfix for DROP TABLE if table is self-referenced byJan Wieck2000-02-04
| | | | | | a FOREIGN KEY constraint. Jan
* Added ALTER TABLE ... ADD CONSTRAINT (provided by Stephan Szabo).Jan Wieck2000-02-04
| | | | | | | | | | | Added constraint dumping capability to pg_dump (also from Stephan) Fixed DROP TABLE -> RelationBuildTriggers: 2 record(s) not found for rel error. Fixed little error in gram.y I made the last days. Jan
* Fix problems seen in parallel regress tests when SI buffer overruns (causingTom Lane2000-01-31
| | | | | | | | | | | | | | | | | | | | | | | syscache and relcache flushes). Relcache entry rebuild now preserves original tupledesc, rewrite rules, and triggers if possible, so that pointers to these things remain valid --- if these things change while relcache entry has positive refcount, we elog(ERROR) to avoid later crash. Arrange for xact-local rels to be rebuilt when an SI inval message is seen for them, so that they are updated by CommandCounterIncrement the same as regular rels. (This is useful because of Hiroshi's recent changes to process our own SI messages at CommandCounterIncrement time.) This allows simplification of some routines that previously hacked around the lack of an automatic update. catcache now keeps its own copy of tupledesc for its relation, rather than depending on the relcache's copy; this avoids needing to reinitialize catcache during a cache flush, which saves some cycles and eliminates nasty circularity problems that occur if a cache flush happens while trying to initialize a catcache. Eliminate a number of permanent memory leaks that used to happen during catcache or relcache flush; not least of which was that catcache never freed any cached tuples! (Rule parsetree storage is still leaked, however; will fix that separately.) Nothing done yet about code that uses tuples retrieved by SearchSysCache for longer than is safe.
* Another FUNC_MAX_ARGS tweak.Tom Lane2000-01-11
|
* Make number of args to a function configurable.Bruce Momjian2000-01-10
|
* Changed "triggered data change violation" detection codeJan Wieck2000-01-06
| | | | | | in trigger manager. Jan
* Fix it's and its to be correct.Bruce Momjian2000-01-05
|
* Repair bugs discussed in pghackers thread of 15 May 1999: creation of aTom Lane1999-12-30
| | | | | | relcache entry no longer leaks a small amount of memory. index_endscan now releases all the memory acquired by index_beginscan, so callers of it should NOT pfree the scan descriptor anymore.
* Some changes to prepare for LONG attributes.Jan Wieck1999-12-16
| | | | Jan
* Added global variable to have RI triggers overrideJan Wieck1999-12-10
| | | | | | time qualification of HeapTupleSatisfiesSnapshot() Jan
* Completed FOREIGN KEY syntax.Jan Wieck1999-12-06
| | | | | | | | Added functionality for automatic trigger creation during CREATE TABLE. Added ON DELETE RESTRICT and some others. Jan
* Rename heap_replace to heap_update.Bruce Momjian1999-11-24
|
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
* New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian1999-11-07
| | | | | | Fewer calls to nameout. Better use of RelationGetRelationName.
* Hello.Bruce Momjian1999-10-26
| | | | | | | | | | | | | | | | | | | The following patch extends the COMMENT ON functionality to the rest of the database objects beyond just tables, columns, and views. The grammer of the COMMENT ON statement now looks like: COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <objname> | COLUMN <relation>.<attribute> | AGGREGATE <aggname> <aggtype> | FUNCTION <funcname> (arg1, arg2, ...) | OPERATOR <op> (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON relname> Mike Mascari (mascarim@yahoo.com)
* Added utils/adt/ri_triggers with empty shells for theJan Wieck1999-09-30
| | | | | | | | FOREIGN KEY triggers. Added pg_proc entries for all the new functions. Jan
* This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.Jan Wieck1999-09-29
| | | | | | | | | | | | Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-18
| | | | | | | | | | | | | | | | | additional argument specifying the kind of lock to acquire/release (or 'NoLock' to do no lock processing). Ensure that all relations are locked with some appropriate lock level before being examined --- this ensures that relevant shared-inval messages have been processed and should prevent problems caused by concurrent VACUUM. Fix several bugs having to do with mismatched increment/decrement of relation ref count and mismatched heap_open/close (which amounts to the same thing). A bogus ref count on a relation doesn't matter much *unless* a SI Inval message happens to arrive at the wrong time, which is probably why we got away with this sloppiness for so long. Repair missing grab of AccessExclusiveLock in DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi. Recommend 'make clean all' after pulling this update; I modified the Relation struct layout slightly. Will post further discussion to pghackers list shortly.
* 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
|
* Generate distinct error messages for trigger function not foundTom Lane1999-05-20
| | | | and trigger function found but returns wrong type.
* Add new postgres -O option to allow system table structure changes.Bruce Momjian1999-03-17
|
* Changes to fix/improve the dynamic loading on NTMarc G. Fournier1999-03-09
| | | | From: Horak Daniel <horak@mmp.plzen-city.cz>
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-03
|
* Fixed growing of backend due to not pfree()'d data on COPY FROMJan Wieck1999-02-01
| | | | | | | Fixed growing of backend if BEFORE DELETE trigger returns heap tuple different from trigtuple. Jan
* Hope that execMain.c good merged.Vadim B. Mikheev1999-01-29
| | | | | Fix for BEFORE ROW UPDATE triggers: result tuple may be different (due to concurrent update) from one initially produced by top level plan.
* READ COMMITTED isolevel is implemented and is default now.Vadim B. Mikheev1999-01-29
|
* SET TRANSACTION ISOLATION LEVEL ...Vadim B. Mikheev1998-12-18
| | | | | LOCK TABLE IN ... MODE ...implemented
* Initial MVCC code.Vadim B. Mikheev1998-12-15
| | | | New code for locking buffer' context.