summaryrefslogtreecommitdiff
path: root/contrib/spi/refint.c
Commit message (Collapse)AuthorAgeFilesLines
* Adjust comments previously moved to column 1 by pgident.Bruce Momjian2004-10-071-1/+1
|
* pgindent run.Bruce Momjian2003-08-041-5/+5
|
* Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)Tom Lane2003-07-241-14/+44
|
* Make debug_ GUC varables output DEBUG1 rather than LOG, and mention inBruce Momjian2003-05-271-4/+4
| | | | | docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location. Doc changes included.
* Restore NOTICEs that were mistakenly removed from triggers regressionTom Lane2002-10-031-2/+4
| | | | | test expected output. Tweak contrib/spi Makefile so that refint.so is by default built with appropriate NOTICE support for regression testing.
* pgindent run.Bruce Momjian2002-09-041-6/+6
|
* I checked all the previous string handling errors and most of them wereBruce Momjian2002-09-021-12/+12
| | | | | | | | | | | | | | | 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
* The attached patch changes most of the usages of sprintf() toBruce Momjian2002-08-151-12/+14
| | | | | | | | | snprintf() in contrib/. I didn't touch the places where pointer arithmatic was being used, or other areas where the fix wasn't trivial. I would think that few, if any, of the usages of sprintf() were actually exploitable, but it's probably better to be paranoid... Neil Conway
* Remove the last traces of datatypes datetime and timespan.Tom Lane2002-05-031-1/+1
|
* Change made to elog:Bruce Momjian2002-03-061-5/+5
| | | | | | | | | | | | | | | | | | | 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.
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-051-1/+1
| | | | initdb/regression tests pass.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-281-3/+3
| | | | spacing. Also adds space for one-line comments.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-251-6/+5
| | | | tests pass.
* Fix comments that were mis-wrapped, for Tom Lane.Bruce Momjian2001-03-231-8/+18
|
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-031-2/+2
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* Revise handling of oldstyle/newstyle functions per recent discussionsTom Lane2000-11-201-0/+4
| | | | | | | | | in pghackers list. Support for oldstyle internal functions is gone (no longer needed, since conversion is complete) and pg_language entry 'internal' now implies newstyle call convention. pg_language entry 'newC' is gone; both old and newstyle dynamically loaded C functions are now called language 'C'. A newstyle function must be identified by an associated info routine. See src/backend/utils/fmgr/README.
* Second round of fmgr changes: triggers are now invoked in new style,Tom Lane2000-05-291-48/+36
| | | | CurrentTriggerData is history.
* pgindent run over code.Bruce Momjian1999-05-251-58/+70
|
* I am sorry, I misinterpreted the still failing trigger regression test.Bruce Momjian1999-05-121-2/+0
| | | | | | | | | | | | | | | | | The offending code has been removed, the action is now always dependent :-) I suggest the following patch, to finally make trigger regression happy again: <<refint1.patch>> After that you can remove the following from TODO: Remove ERROR: check_primary_key: even number of arguments should be specified Trigger regression test fails Andreas
* I send you a attach of my modified refint.c thatBruce Momjian1999-05-101-79/+75
| | | | | | | | | | | | works with a new policy in cascade mode . Please Read README.MAX . I do not know if you are the author of refint.c , but if not please tell me who is . Thank you ( excuse me for my bad english) . Massimo Lambertini massimo.lambertini@everex.it
* Hi All,Bruce Momjian1999-03-151-7/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I've changed the check_primary_key() function code to allow for either the "automatic insert key rule" or "dependent insert key rule". Previously it restricted the addtion of a child entry if the corresponding parent entry was not there. Now if the option is "automatic" it will add an entry in the parent too ( it will be successful if there are no no-null fields in the parent apart from the primary key). The way to use it now is: :/* * check_primary_key () -- check that key in tuple being inserted/updated * references existing tuple in "primary" table. * Though it's called without args You have to specify referenced * table/keys while creating trigger: key field names in triggered table, * referenced table name, referenced key field names,type of action [automatic|dependent]: * EXECUTE PROCEDURE * check_primary_key ('Fkey1', 'Fkey2', 'Ptable', 'Pkey1', 'Pkey2', '[automatic|dependent]'). */ I am attaching the new ../contrib/spi/refint.c file which will do this. I will be glad to help in case of any problems. - Anand.
* > > There is a bug in check_foreign_key of refint.c which is bundled withBruce Momjian1998-10-061-0/+2
| | | | | | | | | | | | | > > the standard distribution. It occurs when a trigger calling this > > function recursively fires another trigger which calls the same > > function. The calling check_foreign_key loses its plan informantion and > > when it tries to use it the backend closes its channel. You can check it > > with the sql script I am attaching below. > > The solution to this is to do a find_plan again before executing it at > > line 483 of refint.c. > > Therefore two more lines should be added before line 483: Anand Surelia
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-261-2/+2
|
* From: plh@opim.uconn.eduMarc G. Fournier1998-02-141-1/+1
| | | | Missing = in an update
* Change some labels in bootparse to make ctags happy. Clean up ↵Bruce Momjian1998-01-061-25/+25
| | | | outfunc/readfunc code and add missing fields for Query structure and new Union fields. Fix optimizer bug shown in new \do command. Change WARN to ERROR in contrib and regression stuff.
* char* --> DatumVadim B. Mikheev1997-09-121-5/+5
|
* General trigger functions for referential integrity.Vadim B. Mikheev1997-09-111-0/+542