summaryrefslogtreecommitdiff
path: root/src/backend/rewrite/rewriteSupport.c
Commit message (Collapse)AuthorAgeFilesLines
* Final cleanup.Bruce Momjian1999-07-161-3/+3
|
* Update #include cleanupsBruce Momjian1999-07-161-3/+3
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-151-10/+1
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-151-2/+1
|
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-131-2/+2
|
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-031-3/+2
|
* Initial MVCC code.Vadim B. Mikheev1998-12-151-2/+2
| | | | New code for locking buffer' context.
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-271-2/+2
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-011-6/+7
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-011-3/+3
|
* This is the final state of the rule system for 6.4 after theBruce Momjian1998-08-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-191-35/+14
| | | | | | | | | | | | | no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
* Use Snapshot in heap access methods.Vadim B. Mikheev1998-07-271-6/+2
|
* From: t-ishii@sra.co.jpMarc G. Fournier1998-07-261-2/+2
| | | | | | | | | As Bruce mentioned, this is due to the conflict among changes we made. Included patches should fix the problem(I changed all MB to MULTIBYTE). Please let me know if you have further problem. P.S. I did not include pathces to configure and gram.c to save the file size(configure.in and gram.y modified).
* I really hope that I haven't missed anything in this one...Marc G. Fournier1998-07-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: t-ishii@sra.co.jp Attached are patches to enhance the multi-byte support. (patches are against 7/18 snapshot) * determine encoding at initdb/createdb rather than compile time Now initdb/createdb has an option to specify the encoding. Also, I modified the syntax of CREATE DATABASE to accept encoding option. See README.mb for more details. For this purpose I have added new column "encoding" to pg_database. Also pg_attribute and pg_class are changed to catch up the modification to pg_database. Actually I haved added pg_database_mb.h, pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is enabled. The reason having separate files is I couldn't find a way to use ifdef or whatever in those files. I have to admit it looks ugly. No way. * support for PGCLIENTENCODING when issuing COPY command commands/copy.c modified. * support for SQL92 syntax "SET NAMES" See gram.y. * support for LATIN2-5 * add UNICODE regression test case * new test suite for MB New directory test/mb added. * clean up source files Basic idea is to have MB's own subdirectory for easier maintenance. These are include/mb and backend/utils/mb.
* Remove un-needed braces around single statements.Bruce Momjian1998-06-151-3/+1
|
* This patch...Bruce Momjian1998-04-271-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Removes the unnecessary "#define AbcRegProcedure 123"'s from pg_proc.h. 2. Changes those #defines to use the names already defined in fmgr.h. 3. Forces the make of fmgr.h in backend/Makefile instead of having it made as a dependency in access/common/Makefile *hack*hack*hack* 4. Rearranged the #includes to a less helter-skelter arrangement, also changing <file.h> to "file.h" to signify a non-system header. 5. Removed "pg_proc.h" from files where its only purpose was for the #defines removed in item #1. 6. Added "fmgr.h" to each file changed for completeness sake. Turns out that #6 was not necessary for some files because fmgr.h was being included in a roundabout way SIX levels deep by the first include. "access/genam.h" ->"access/relscan.h" ->"utils/rel.h" ->"access/strat.h" ->"access/skey.h" ->"fmgr.h" So adding fmgr.h really didn't add anything to the compile, hopefully just made it clearer to the programmer. S Darren.
* Re-apply Darren's char2-16 removal code.Bruce Momjian1998-04-261-2/+2
|
* Back out char2-char16 removal. Add later.Bruce Momjian1998-04-071-2/+2
|
* The following uuencoded, gzip'd file will ...Bruce Momjian1998-03-301-2/+2
| | | | | | | | | | | 1. Remove the char2, char4, char8 and char16 types from postgresql 2. Change references of char16 to name in the regression tests. 3. Rename the char16.sql regression test to name.sql. 4. Modify the regression test scripts and outputs to match up. Might require new regression.{SYSTEM} files... Darren King
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-261-8/+8
|
* Inline fastgetattr and others so data access does not use functionBruce Momjian1998-01-311-4/+3
| | | | calls.
* Goodbye ABORT. Hello ERROR for all errors.Bruce Momjian1998-01-071-3/+3
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-051-3/+3
|
* Remove all time travel stuff. Small parser cleanup.Bruce Momjian1997-11-201-2/+2
|
* Change column number constant to reflect change in column nameThomas G. Lockhart1997-10-251-2/+2
| | | | from "action" to "ev_action".
* heapattr functions now return a Datum, not char *.Bruce Momjian1997-09-121-9/+9
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-081-4/+4
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-081-30/+30
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-071-210/+218
|
* Remove more (void) and fix -Wall warnings.Bruce Momjian1997-08-121-2/+2
|
* Change %ud to %uBruce Momjian1996-12-261-2/+2
| | | | Darren King.
* Fix syntax error: missing argument to elog(). Thanks Darren King.Bryan Henderson1996-11-241-2/+2
|
* Compile and warning cleanupBruce Momjian1996-11-081-1/+3
|
* This change should have no practical effect but it is the moreMarc G. Fournier1996-10-111-2/+2
| | | | | | | | correct way to do this. Theoretically you could have a NULL pointer that isn't represented internally as all 0 bits. This guarantees that it convert correctly. Submitted by: darcy@druid.com (D'Arcy J.M. Cain)
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-091-0/+270