mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Code review for FILLFACTOR patch. Change WITH grammar as per earlier
discussion (including making def_arg allow reserved words), add missed opt_definition for UNIQUE case. Put the reloptions support code in a less random place (I chose to make a new file access/common/reloptions.c). Eliminate header inclusion creep. Make the index options functions safely user-callable (seems like client apps might like to be able to test validity of options before trying to make an index). Reduce overhead for normal case with no options by allowing rd_options to be NULL. Fix some unmaintainably klugy code, including getting rid of Natts_pg_class_fixed at long last. Some stylistic cleanup too, and pay attention to keeping comments in sync with code. Documentation still needs work, though I did fix the omissions in catalogs.sgml and indexam.sgml.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.133 2006/07/02 02:23:19 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.134 2006/07/03 22:45:38 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -205,17 +205,7 @@ DefineSequence(CreateSeqStmt *seq)
|
||||
|
||||
/* Now form & insert sequence tuple */
|
||||
tuple = heap_formtuple(tupDesc, value, null);
|
||||
|
||||
{
|
||||
/*
|
||||
* HACK: Sequences insert only one tuple during initialize.
|
||||
* We treat sequences as heaps then.
|
||||
*/
|
||||
HeapOption opaque = { sizeof(HeapOption), 100 };
|
||||
rel->rd_options = (bytea *) &opaque;
|
||||
simple_heap_insert(rel, tuple);
|
||||
rel->rd_options = NULL;
|
||||
}
|
||||
simple_heap_insert(rel, tuple);
|
||||
|
||||
Assert(ItemPointerGetOffsetNumber(&(tuple->t_self)) == FirstOffsetNumber);
|
||||
|
||||
|
Reference in New Issue
Block a user