]> granicus.if.org Git - postgresql/commit
I attach a version of my toast-slicing patch, against current CVS
authorBruce Momjian <bruce@momjian.us>
Tue, 5 Mar 2002 05:33:31 +0000 (05:33 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 5 Mar 2002 05:33:31 +0000 (05:33 +0000)
commit03194432de712f7afb4ddc2ade2bc44f0536dae1
tree8a864adc9b1d924fe8f6a919b51d34cef4a4ef01
parent276fc7ce829404627075ebf8ed5ee3039923eb2b
I attach a version of my toast-slicing patch, against current CVS
(current as of a few hours ago.)

This patch:

1. Adds PG_GETARG_xxx_P_SLICE() macros and associated support routines.

2. Adds routines in src/backend/access/tuptoaster.c for fetching only
necessary chunks of a toasted value. (Modelled on latest changes to
assume chunks are returned in order).

3. Amends text_substr and bytea_substr to use new methods. It now
handles multibyte cases -and should still lead to a performance
improvement in the multibyte case where the substring is near the
beginning of the string.

4. Added new command: ALTER TABLE tabname ALTER COLUMN colname SET
STORAGE {PLAIN | EXTERNAL | EXTENDED | MAIN} to parser and documented in
alter-table.sgml. (NB I used ColId as the item type for the storage
mode string, rather than a new production - I hope this makes sense!).
All this does is sets attstorage for the specified column.

4. AlterTableAlterColumnStatistics is now AlterTableAlterColumnFlags and
handles both statistics and storage (it uses the subtype code to
distinguish). The previous version of my patch also re-arranged other
code in backend/commands/command.c but I have dropped that from this
patch.(I plan to return to it separately).

5. Documented new macros (and also the PG_GETARG_xxx_P_COPY macros) in
xfunc.sgml. ref/alter_table.sgml also contains documentation for ALTER
COLUMN SET STORAGE.

John Gray
13 files changed:
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/xfunc.sgml
src/backend/access/heap/tuptoaster.c
src/backend/commands/command.c
src/backend/parser/gram.y
src/backend/parser/keywords.c
src/backend/tcop/utility.c
src/backend/utils/adt/varlena.c
src/backend/utils/fmgr/fmgr.c
src/include/access/tuptoaster.h
src/include/commands/command.h
src/include/fmgr.h
src/include/nodes/parsenodes.h