aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/sequence.c
Commit message (Collapse)AuthorAge
...
* Make OIDs optional, per discussions in pghackers. WITH OIDS is still theTom Lane2001-08-10
| | | | | | | | | | | | default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
* Further work on connecting the free space map (which is still just aTom Lane2001-06-29
| | | | | | | | stub) into the rest of the system. Adopt a cleaner approach to preventing deadlock in concurrent heap_updates: allow RelationGetBufferForTuple to select any page of the rel, and put the onus on it to lock both buffers in a consistent order. Remove no-longer-needed isExtend hack from API of ReleaseAndReadBuffer.
* Add TEMPORARY sequences and have SERIAL on a temp table have a temporaryBruce Momjian2001-06-23
| | | | sequence.
* Fix compile failure when --enable-multibyte.Bruce Momjian2001-06-13
| | | | Marko Kreen
* get_seq_name should truncate name to NAMEDATALEN, so that this works:Tom Lane2001-06-06
| | | | | create sequence a1234567890123456789012345678901234567890; select nextval('a1234567890123456789012345678901234567890');
* Check for malloc failure.Tom Lane2001-06-01
|
* Make UPDATE and DELETE privileges distinct. Add REFERENCES and TRIGGERPeter Eisentraut2001-05-27
| | | | | privileges. INSERT and COPY FROM now require INSERT (only). Add privileges regression test.
* Avoid unnecessary lseek() calls by cleanups in md.c. mdfd_lstbcnt wasTom Lane2001-05-10
| | | | | | | | | not being consulted anywhere, so remove it and remove the _mdnblocks() calls that were used to set it. Change smgrextend interface to pass in the target block number (ie, current file length) --- the caller always knows this already, having already done smgrnblocks(), so it's silly to do it over again inside mdextend. Net result: extension of a file now takes one lseek(SEEK_END) and a write(), not three lseeks and a write.
* Have to lock buffer while changing page' LSN.Vadim B. Mikheev2001-04-04
| | | | Thanks to Tom.
* Log sequence creation (to initialize magic number on recovery).Vadim B. Mikheev2001-04-03
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Repair a number of places that didn't bother to check whether PageAddItemTom Lane2001-03-07
| | | | | | | | | | succeeds or not. Revise rtree page split algorithm to take care about making a feasible split --- ie, will the incoming tuple actually fit? Failure to make a feasible split, combined with failure to notice the failure, account for Jim Stone's recent bug report. I suspect that hash and gist indices may have the same type of bug, but at least now we'll get error messages rather than silent failures if so. Also clean up rtree code to use Datum rather than char* where appropriate.
* Added some comments to setval, setval_is_called and do_setvalPhilip Warner2001-02-13
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Add more critical-section calls: all code sections that hold spinlocksTom Lane2001-01-12
| | | | | | | | | | | are now critical sections, so as to ensure die() won't interrupt us while we are munging shared-memory data structures. Avoid insecure intermediate states in some code that proc_exit will call, like palloc/pfree. Rename START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be what people tend to call them anyway, and make them be called with () like a function call, in hopes of not confusing pg_indent. I doubt that this is sufficient to make SIGTERM safe anywhere; there's just too much code that could get invoked during proc_exit().
* New WAL version - CRC and data blocks backup.Vadim B. Mikheev2000-12-28
|
* Add missing copyright and RCS identification header.Tom Lane2000-12-08
|
* Remove error check that disallowed setval() on a sequence with cacheTom Lane2000-12-08
| | | | | | | | | value greater than one. The behavior this sought to disallow doesn't seem any less confusing than the other behaviors of cached sequences. Improve wording of some error messages, too. Update documentation accordingly. Also add an explanation that aborted transactions do not roll back their nextval() calls; this seems to be a FAQ, so it ought to be mentioned here...
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-03
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev2000-12-03
| | | | critical sections of code.
* XLOG stuff for sequences.Vadim B. Mikheev2000-11-30
| | | | CommitDelay in guc.c
* Remove NO_SECURITY define.Bruce Momjian2000-10-16
|
* Fix prototype declaration based on patch from David ReidPhilip Warner2000-10-15
|
* Added new SQL function setval(seq,val,bool) to restore is_called as well as ↵Philip Warner2000-10-11
| | | | | | value (will be used in a future pg_dump).
* Code cleanup of user name and user id handling in the backend. The currentPeter Eisentraut2000-09-06
| | | | | | | | | | | user is now defined in terms of the user id, the user name is only computed upon request (for display purposes). This is kind of the opposite of the previous state, which would maintain the user name and compute the user id for permission checks. Besides perhaps saving a few cycles (integer vs string), this now creates a single point of attack for changing the user id during a connection, for purposes of "setuid" functions, etc.
* 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).
* Update textin() and textout() to new fmgr style. This is just phaseTom Lane2000-07-05
| | | | | one of updating the whole text datatype, but there are so dang many calls of these two routines that it seems worth a separate commit.
* Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut2000-06-14
| | | | | | | | | | | we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
* Update sequence-related functions to new fmgr style. Remove downcasing,Tom Lane2000-06-11
| | | | | | | | quote-stripping, and acl-checking tasks for these functions from the parser, and do them at function execution time instead. This fixes the failure of pg_dump to produce correct output for nextval(Foo) used in a rule, and also eliminates the restriction that the argument of these functions must be a parse-time constant.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Fixed all elog related warnings, as well as a few others.Peter Eisentraut2000-01-15
|
* Revise init_sequence so that it doesn't leak memory if the requestedTom Lane1999-12-31
| | | | sequence doesn't exist.
* Reimplement parsing and storage of default expressions and constraintTom Lane1999-10-03
| | | | | | | | | | | | | | | 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-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
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Initial MVCC code.Vadim B. Mikheev1998-12-15
| | | | New code for locking buffer' context.
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-27
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* From: Massimo Dal Zotto <dz@cs.unitn.it>Marc G. Fournier1998-08-25
| | | | | | | | | > sequence.patch > > adds the missing setval command to sequences. Owner of sequences > can now set the last value to any value between min and max > without recreating the sequence. This is useful after loading > data from external files.
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-19
| | | | | | | | | | | | | 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;
* Make large objects their own relkind type. Fix dups in pg_class_mbBruce Momjian1998-08-06
| | | | files. Fix sequence creation hack for relkind type.
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* The buffer overrun while creating sequences turns out to be a readBruce Momjian1998-03-30
| | | | | | | | | access overrun. For the sake of doing things properly here is a patch which fixes it. This patch is for the file backend/commands/sequence.c. Maurice Gittens
* There's a patch attached to fix gcc 2.8.x warnings, except for theBruce Momjian1998-03-30
| | | | | | | | | | | | | | | | | | | | | | | | yyerror ones from bison. It also includes a few 'enhancements' to the C programming style (which are, of course, personal). The other patch removes the compilation of backend/lib/qsort.c, as qsort() is a standard function in stdlib.h and can be used any where else (and it is). It was only used in backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c, and backend/storage/page/bufpage.c > > Some or all of these changes might not be appropriate for v6.3, since we > > are in beta testing and since they do not affect the current functionality. > > For those cases, how about submitting patches based on the final v6.3 > > release? There's more to come. Please review these patches. I ran the regression tests and they only failed where this was expected (random, geo, etc). Cheers, Jeroen