aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ri_triggers.c
Commit message (Collapse)AuthorAge
* More cleanup of userid to be AclId rather than Oid.Bruce Momjian2002-12-05
|
* 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.
* Hack to make it possible to load CREATE CONSTRAINT TRIGGER commands thatTom Lane2002-10-03
| | | | | are missing the FROM clause (due to a long-ago pg_dump bug). Patch by Stephan Szabo, minor tweaking by Tom Lane.
* pgindent run.Bruce Momjian2002-09-04
|
* I checked all the previous string handling errors and most of them wereBruce Momjian2002-09-02
| | | | | | | | | | | | | | | already fixed by You. However there were a few left and attached patch should fix the rest of them. I used StringInfo only in 2 places and both of them are inside debug ifdefs. Only performance penalty will come from using strlen() like all the other code does. I also modified some of the already patched parts by changing snprintf(buf, 2 * BUFSIZE, ... style lines to snprintf(buf, sizeof(buf), ... where buf is an array. Jukka Holappa
* This should fix a bug where a row that was updated orBruce Momjian2002-07-30
| | | | | | | | | | | deleted that had another row inserted/updated to its old value during the same statement or other statements before the integrity check for noaction would incorrectly error. This could happen in deferred constraints or due to triggers or functions. It's effectively a reworking of the previous patch that did a not exists to instead do a separate check. Stephan Szabo
* Remove Jan's copyright, with his approval.Bruce Momjian2002-06-21
|
* Clean up some copyrights.Bruce Momjian2002-06-20
|
* Operators live in namespaces. CREATE/DROP/COMMENT ON OPERATOR takeTom Lane2002-04-16
| | | | | | | | | | qualified operator names directly, for example CREATE OPERATOR myschema.+ ( ... ). To qualify an operator name in an expression you need to write OPERATOR(myschema.+) (thanks to Peter for suggesting an escape hatch). I also took advantage of having to reformat pg_operator to fix something that'd been bugging me for a while: mergejoinable operators should have explicit links to the associated cross-data-type comparison operators, rather than hardwiring an assumption that they are named < and >.
* Make VACUUM handle schema-qualified relation names properly.Tom Lane2002-04-02
|
* Add tgconstrrelid to stored Trigger structures, make RI trigger functionsTom Lane2002-04-01
| | | | | | | | depend on this rather than the trigger argument strings to locate the other relation to test. This makes RI triggers function properly in the presence of schemas and temp tables. Along the way, fix bogus lack of locking in RI triggers, handle quoting of names fully correctly, compute required sizes of query buffers with some semblance of accuracy.
* Temporary kluge to let RI triggers work on tables outside the systemTom Lane2002-04-01
| | | | | | | | catalog namespace. This will not do as a production solution because the interpretation of RI trigger arguments will vary depending on the current namespace search path. I'm just putting it in so that the RI regression tests don't fail while schema development proceeds. We must find a better answer before 7.3 can be released.
* Fix for trigger handling:Bruce Momjian2002-03-19
| | | | | | | | * We should not even consider checking the row if it is no longer * valid since it was either deleted (doesn't matter) or updated * (in which case it'll be checked with its final values). Stephan Szabo
* Change made to elog:Bruce Momjian2002-03-06
| | | | | | | | | | | | | | | | | | | o Change all current CVS messages of NOTICE to WARNING. We were going to do this just before 7.3 beta but it has to be done now, as you will see below. o Change current INFO messages that should be controlled by client_min_messages to NOTICE. o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc. to always go to the client. o Remove INFO from the client_min_messages options and add NOTICE. Seems we do need three non-ERROR elog levels to handle the various behaviors we need for these messages. Regression passed.
* Tables without oids wouldn't be able to beBruce Momjian2001-11-12
| | | | | | | | | | used inside fk constraints, since some of the checks in the trigger did a SELECT oid. Since the oid wasn't actually used, I changed this to SELECT 1. My test case with non-oid tables now works and fk regression appears to run fine on my machine. Stephan Szabo
* Make ALTER TABLE RENAME update foreign-key trigger arguments correctly.Tom Lane2001-11-12
| | | | Brent Verner, with review and kibitzing from Tom Lane.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfoTom Lane2001-10-06
| | | | | | | | | lookup info in the relcache for index access method support functions. This makes a huge difference for dynamically loaded support functions, and should save a few cycles even for built-in ones. Also tweak dfmgr.c so that load_external_function is called only once, not twice, when doing fmgr_info for a dynamically loaded function. All per performance gripe from Teodor Sigaev, 5-Oct-01.
* Further cleanup of dynahash.c API, in pursuit of portability andTom Lane2001-10-05
| | | | | | | | | readability. Bizarre '(long *) TRUE' return convention is gone, in favor of just raising an error internally in dynahash.c when we detect hashtable corruption. HashTableWalk is gone, in favor of using hash_seq_search directly, since it had no hope of working with non-LONGALIGNable datatypes. Simplify some other code that was made undesirably grotty by promixity to HashTableWalk.
* Another round of cleanups for dynahash.c (maybe it's finally clean ofTom Lane2001-10-01
| | | | | | | | | portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically.
* RI triggers would fail for datatypes using old-style equal function,Tom Lane2001-05-31
| | | | | | because cached fmgr info contained reference to a shorter-lived data structure. Also guard against possibility that fmgr_info could fail, leaving an incomplete entry present in the hash table.
* Fix remaining RI permission problems (cascaded update/delete, restrict,Peter Eisentraut2001-05-07
| | | | set null/default).
* 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
|
* Add some notes about memory management of RI plans.Tom Lane2001-02-15
|
* Add 'ONLY' to queries generated by RI triggers, so as to preserve pre-7.1Tom Lane2000-12-22
| | | | | semantics of RI operations. Eventually we ought to look at making RI work properly across inheritance trees, but not for 7.1 ...
* keep relations open until they are no longer needed.Hiroshi Inoue2000-11-21
|
* 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.
* When the RI triggers lock the PK table, temporarily switch the current userPeter Eisentraut2000-09-25
| | | | id to the owner of the PK table, to avoid permission problems.
* 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.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Added complete MATCH <unspecified> support contributed by Don Baccus.Jan Wieck2000-02-07
| | | | Jan
* Changed "triggered data change violation" detection codeJan Wieck2000-01-06
| | | | | | in trigger manager. Jan
* Fixed bug in targetlist expression replacement ofJan Wieck2000-01-06
| | | | | | SET DEFAULT referential action triggers. Jan
* Added global variable to have RI triggers overrideJan Wieck1999-12-10
| | | | | | time qualification of HeapTupleSatisfiesSnapshot() Jan
* Fixed concurrent visibility bug.Jan Wieck1999-12-08
| | | | Jan
* Again updated INSIDE TODOJan Wieck1999-12-07
| | | | Jan
* Added SET DEFAULT action for ON DELETE/UPDATEJan Wieck1999-12-07
| | | | Jan
* Corrected TODO in sourceJan Wieck1999-12-06
| | | | Jan
* Added ON DELETE/UPDATE SET NULLJan Wieck1999-12-06
| | | | 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
* 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.
* First real FOREIGN KEY constraint trigger functionality.Jan Wieck1999-10-08
| | | | | | | | | Implemented now: FOREIGN KEY ... REFERENCES ... MATCH FULL FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE Jan
* 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