Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf828f87

Browse files
committed
Change on-disk representation of NUMERIC datatype so that the sign_dscale
word comes before the weight instead of after. This will allow futurebinary-compatible extension of the representation to support compact formats,as discussed on pgsql-hackers around 2007/06/18. The reason to do it now isthat we've already pretty well broken any chance of simple in-place upgradefrom 8.2 to 8.3, but it's possible that 8.3 to 8.4 (or whenever we get aroundto squeezing NUMERIC) could otherwise be data-compatible.
1 parent7a315a0 commitf828f87

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.428 2007/09/2520:03:38 tgl Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.429 2007/09/2522:21:55 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200709241
56+
#defineCATALOG_VERSION_NO200709251
5757

5858
#endif

‎src/include/utils/numeric.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1998-2007, PostgreSQL Global Development Group
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/numeric.h,v 1.24 2007/02/27 23:48:10 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/numeric.h,v 1.25 2007/09/25 22:21:55 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -63,14 +63,14 @@
6363
typedefstructNumericData
6464
{
6565
int32vl_len_;/* varlena header (do not touch directly!) */
66-
int16n_weight;/* Weight of 1st digit*/
6766
uint16n_sign_dscale;/* Sign + display scale */
67+
int16n_weight;/* Weight of 1st digit*/
6868
charn_data[1];/* Digits (really array of NumericDigit) */
6969
}NumericData;
7070

7171
typedefNumericData*Numeric;
7272

73-
#defineNUMERIC_HDRSZ(VARHDRSZ + sizeof(int16) + sizeof(uint16))
73+
#defineNUMERIC_HDRSZ(VARHDRSZ + sizeof(uint16) + sizeof(int16))
7474

7575

7676
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp