diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-06 04:21:44 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-06 04:21:44 +0000 |
| commit | 3e23b68dac006e8deb0afa327e855258df8de064 (patch) | |
| tree | f5a555955dd954265dea1107e08dadd917714551 /src/backend/catalog/toasting.c | |
| parent | d44163953c2ce74d6db9d9807e030a0a3b725da5 (diff) | |
| download | postgresql-3e23b68dac006e8deb0afa327e855258df8de064.tar.gz | |
Support varlena fields with single-byte headers and unaligned storage.
This commit breaks any code that assumes that the mere act of forming a tuple
(without writing it to disk) does not "toast" any fields. While all available
regression tests pass, I'm not totally sure that we've fixed every nook and
cranny, especially in contrib.
Greg Stark with some help from Tom Lane
Diffstat (limited to 'src/backend/catalog/toasting.c')
| -rw-r--r-- | src/backend/catalog/toasting.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/catalog/toasting.c b/src/backend/catalog/toasting.c index 47f5e25fd2..463f038c0f 100644 --- a/src/backend/catalog/toasting.c +++ b/src/backend/catalog/toasting.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/catalog/toasting.c,v 1.5 2007/01/09 02:14:11 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/toasting.c,v 1.6 2007/04/06 04:21:42 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -314,7 +314,7 @@ needs_toast_table(Relation rel) { if (att[i]->attisdropped) continue; - data_length = att_align(data_length, att[i]->attalign); + data_length = att_align_nominal(data_length, att[i]->attalign); if (att[i]->attlen > 0) { /* Fixed-length types are never toastable */ |
