1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

The following small patch provides a couple of minor updates (against

CVS HEAD):

Amended "strings" regression test. TOAST tests now insert two values
with storage set to "external", to exercise properly the TOAST slice
routines which fetch only a subset of the chunks.

Changed now-misleading comment on AlterTableCreateToastTable in
tablecmds.c, because both columns of the index on a toast table are now
used.

John Gray
This commit is contained in:
Bruce Momjian
2002-08-28 20:18:29 +00:00
parent 1923816c37
commit b60acaf568
3 changed files with 56 additions and 13 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.34 2002/08/27 03:56:34 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.35 2002/08/28 20:18:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3417,12 +3417,13 @@ AlterTableCreateToastTable(Oid relOid, bool silent)
/*
* Create unique index on chunk_id, chunk_seq.
*
* NOTE: the tuple toaster could actually function with a single-column
* index on chunk_id only. However, it couldn't be unique then. We
* want it to be unique as a check against the possibility of
* duplicate TOAST chunk OIDs. Too, the index might be a little more
* efficient this way, since btree isn't all that happy with large
* numbers of equal keys.
* NOTE: the normal TOAST access routines could actually function with
* a single-column index on chunk_id only. However, the slice access
* routines use both columns for faster access to an individual chunk.
* In addition, we want it to be unique as a check against the
* possibility of duplicate TOAST chunk OIDs. The index might also be
* a little more efficient this way, since btree isn't all that happy
* with large numbers of equal keys.
*/
indexInfo = makeNode(IndexInfo);