aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
Commit message (Collapse)AuthorAge
...
* Cleanup of code for creating index entries. Functional indexes withTom Lane2000-07-14
| | | | | | | | | | | | | pass-by-ref data types --- eg, an index on lower(textfield) --- no longer leak memory during index creation or update. Clean up a lot of redundant code ... did you know that copy, vacuum, truncate, reindex, extend index, and bootstrap each basically duplicated the main executor's logic for extracting information about an index and preparing index entries? Functional indexes should be a little faster now too, due to removal of repeated function lookups. CREATE INDEX 'opt_type' clause is deimplemented by these changes, but I haven't removed it from the parser yet (need to merge with Thomas' latest change set first).
* Make toast-table creation and deletion work somewhat reliably.Tom Lane2000-07-04
| | | | | | | Don't go through pg_exec_query_dest(), but directly to the execution routines. Also, extend parameter lists so that there's no need to change the global setting of allowSystemTableMods, a hack that was certain to cause trouble in the event of any error.
* Get rid of IndexIsUniqueNoCache() kluge by the simple expedient ofTom Lane2000-06-17
| | | | | | | passing the index-is-unique flag to index build routines (duh! ... why wasn't it done this way to begin with?). Aside from eliminating an eyesore, this should save a few milliseconds in btree index creation because a full scan of pg_index is not needed any more.
* Clean up #include's.Bruce Momjian2000-06-15
|
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-30
|
* Squash some more CLUSTER bugs. Never has worked on multiple-columnTom Lane2000-05-12
| | | | | | | | | | | | indexes, apparently, nor on functional indexes with more than one input column (force of natts = 1 was in the wrong branch of IF statement). Coredumped if source relation contained any uncommitted tuples, due to failure to test for success return from heap_fetch. Fetched tuple was passed directly to heap_insert, which clobbers the TID and commit status in the tuple header it's given, which meant that the source relation's tuples all got trashed as the copy proceeded. Abort partway through, and you're left with a lot of missing tuples. I wonder what else is lurking here ...
* Fix CLUSTER ... or at least undo the bit-rot it's suffered since 6.5.Tom Lane2000-05-11
| | | | | It's still pretty fundamentally bogus :-(. Freebie side benefit: ALTER TABLE RENAME works on indexes now.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Some changes to prepare for LONG attributes.Jan Wieck1999-12-16
| | | | Jan
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-10
|
* 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.
* New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian1999-11-07
| | | | | | Fewer calls to nameout. Better use of RelationGetRelationName.
* 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
|
* Clean up #include in /include directory. Add scripts for checking includes.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
|
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-03
|
* Add TEMP tables/indexes. Add COPY pfree(). Other cleanups.Bruce Momjian1999-02-02
|
* The following patch finishes primary key support. Previously, whenBruce Momjian1999-01-21
| | | | | | | | | | | | | | | | | | | | a field was labelled as a primary key, the system automatically created a unique index on the field. This patch extends it so that the index has the indisprimary field set. You can pull a list of primary keys with the followiing select. SELECT pg_class.relname, pg_attribute.attname FROM pg_class, pg_attribute, pg_index WHERE pg_class.oid = pg_attribute.attrelid AND pg_class.oid = pg_index.indrelid AND pg_index.indkey[0] = pg_attribute.attnum AND pg_index.indisunique = 't'; There is nothing in this patch that modifies the template database to set the indisprimary attribute for system tables. Should they be changed or should we only be concerned with user tables? D'Arcy
* Initial attempt to clean up the code...Marc G. Fournier1998-12-14
| | | | | | Switch sprintf() to snprintf() Remove any/all #if 0 -or- #ifdef NOT_USED -or- #ifdef FALSE sections of code
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-27
|
* Allow 8-key indexes.Bruce Momjian1998-09-23
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* update fixes.Bruce Momjian1998-08-20
|
* 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.
* Use Snapshot in heap access methods.Vadim B. Mikheev1998-07-27
|
* From: t-ishii@sra.co.jpMarc G. Fournier1998-07-26
| | | | | | | | | 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-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-26
|
* Fix CLUSTER.Bruce Momjian1998-01-10
|
* Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian1998-01-05
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-05
|
* Rename heap_destroyr to heap_destroy, heap_destroy to heap_destroy_with_catalog.Bruce Momjian1997-11-28
|
* Rename heap_create to heap_create_and_catatlog, rename heap_creatr to ↵Bruce Momjian1997-11-28
| | | | heap_create().
* Remove archive stuff.Bruce Momjian1997-11-21
|
* Remove all time travel stuff. Small parser cleanup.Bruce Momjian1997-11-20
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-08
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-07
|
* Make functions static where possible, enclose unused functions in #ifdef ↵Bruce Momjian1997-08-19
| | | | NOT_USED.
* Now that names are null terminated, no need to do all that NAMEDATALEN stuff.Bruce Momjian1997-08-18
|
* Cleanup for NAMEDATALEN use.Bruce Momjian1997-08-03
|
* include sem.h added, include string.h neede, from Erik Bertelsen for UltrixBruce Momjian1997-01-10
|
* Commit of a *MAJOR* patch from Dan McGuirk <djm@indirect.com>Marc G. Fournier1996-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Unique index capability works using the syntax 'create unique index'. * Duplicate OID's in the system tables are removed. I put little scripts called 'duplicate_oids' and 'find_oid' in include/catalog that help to find and remove duplicate OID's. I also moved 'unused_oids' from backend/catalog to include/catalog, since it has to be in the same directory as the include files in order to work. * The backend tries converting the name of a function or aggregate to all lowercase if the original name given doesn't work (mostly for compatibility with ODBC). * You can 'SELECT NULL' to your heart's content. * I put my _bt_updateitem fix in instead, which uses _bt_insertonpg so that even if the new key is so big that the page has to be split, everything still works. * All literal references to system catalog OID's have been replaced with references to define'd constants from the catalog header files. * I added a couple of node copy functions. I think this was a preliminary attempt to get rules to work.