summaryrefslogtreecommitdiff
path: root/src/backend/commands/command.c
Commit message (Collapse)AuthorAgeFilesLines
* Reimplement parsing and storage of default expressions and constraintTom Lane1999-10-031-3/+4
| | | | | | | | | | | | | | | expressions in CREATE TABLE. There is no longer an emasculated expression syntax for these things; it's full a_expr for constraints, and b_expr for defaults (unfortunately the fact that NOT NULL is a part of the column constraint syntax causes a shift/reduce conflict if you try a_expr. Oh well --- at least parenthesized boolean expressions work now). Also, stored expression for a column default is not pre-coerced to the column type; we rely on transformInsertStatement to do that when the default is actually used. This means "f1 datetime default 'now'" behaves the way people usually expect it to. BTW, all the support code is now there to implement ALTER TABLE ADD CONSTRAINT and ALTER TABLE ADD COLUMN with a default value. I didn't actually teach ALTER TABLE to call it, but it wouldn't be much work.
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-181-41/+22
| | | | | | | | | | | | | | | | | 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.
* Remove no-longer-needed code to update temprel's copy ofTom Lane1999-09-041-8/+1
| | | | pg_class tuple during ALTER TABLE ADD COLUMN.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-171-2/+1
|
* Final cleanup.Bruce Momjian1999-07-161-5/+5
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-151-2/+2
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-151-6/+1
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-151-2/+1
|
* Change form() to varargform() to prevent portability problems.Bruce Momjian1999-06-191-7/+7
|
* Another pgindent run. Sorry folks.Bruce Momjian1999-05-251-2/+2
|
* pgindent run over code.Bruce Momjian1999-05-251-13/+13
|
* Change error messages to oids come out as %u and not %d. Change has noBruce Momjian1999-05-101-2/+2
| | | | real affect now.
* Fix adding columns to a temp table.Bruce Momjian1999-04-131-1/+10
|
* Small cleanups.Bruce Momjian1999-03-301-4/+3
|
* cleanupsBruce Momjian1999-03-231-3/+2
|
* Add new postgres -O option to allow system table structure changes.Bruce Momjian1999-03-171-2/+2
|
* Fix problem with selectivity error in added columns with ALTER TABLE.Bruce Momjian1999-02-241-2/+2
| | | | Move files to deadcode.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-131-2/+2
|
* Added LIMIT/OFFSET functionality including new regression test for it.Jan Wieck1999-02-081-2/+20
| | | | | | | 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-031-3/+2
|
* SET TRANSACTION ISOLATION LEVEL ...Vadim B. Mikheev1998-12-181-1/+24
| | | | | LOCK TABLE IN ... MODE ...implemented
* 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-5/+5
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-011-5/+5
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-011-23/+23
|
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-191-46/+23
| | | | | | | | | | | | | 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-2/+2
|
* Remove un-needed braces around single statements.Bruce Momjian1998-06-151-3/+1
|
* This patch...Bruce Momjian1998-04-271-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-261-14/+14
|
* Atttypmod cleanups.Bruce Momjian1998-02-071-4/+4
|
* New pg_attribute.atttypmod for type-specific information likeBruce Momjian1998-01-161-6/+3
| | | | | | | | | | | varchar length. Cleans up code so attlen is always length. Removed varchar() hack added earlier. Will fix bug in selecting varchar() fields, and varchar() can be variable length.
* Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian1998-01-051-12/+12
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-051-12/+12
|
* Remove all time travel stuff. Small parser cleanup.Bruce Momjian1997-11-201-2/+2
|
* Fix binary cursors broken by MOVE implementation.Vadim B. Mikheev1997-10-271-9/+20
| | | | (Thanks to Bruce for finding what caused problem).
* MOVE implementation.Vadim B. Mikheev1997-09-291-5/+7
|
* Fix up elog warning messages.Thomas G. Lockhart1997-09-201-3/+3
|
* ALTER TABLE ADD COLUMN: set atthasdef to FALSE.Vadim B. Mikheev1997-09-181-1/+2
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-081-2/+2
|
* 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-401/+426
|
* Turn constraints off for sequences & viewsVadim B. Mikheev1997-08-221-2/+4
| | | | | elog(WARN,"ADD ATTRIBUTE: DEFAULT is not implemented, yet"); Call ExecConstraints in CopyFrom
* Rename pg_attribute.attnvals to attdisbursion.Bruce Momjian1997-08-211-2/+2
|
* Get rid of attproc, atttyparg, attcanindex, attdefrel, attboundVadim B. Mikheev1997-08-211-6/+1
| | | | from pg_attribute. atthasdef added.
* NOT NULL implementation (submitted by Robson Paniago de Miranda).Vadim B. Mikheev1997-08-191-2/+7
|
* Now that names are null terminated, no need to do all that NAMEDATALEN stuff.Bruce Momjian1997-08-181-9/+9
|
* Remove more (void) and fix -Wall warnings.Bruce Momjian1997-08-121-4/+4
|
* ALTER TABLE (text) fixBruce Momjian1997-01-021-4/+4
|
* Fix for Alter TABLE add column varchar(). Was causing zero length.Bruce Momjian1996-11-171-2/+5
|