File tree 4 files changed +16
-14
lines changed 4 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 6
6
* Copyright (c) 2003-2008, PostgreSQL Global Development Group
7
7
*
8
8
* IDENTIFICATION
9
- * $PostgreSQL: pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.25 2008/11/14 00:12:08 tgl Exp $
9
+ * $PostgreSQL: pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.26 2008/11/14 02:09:51 tgl Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -495,14 +495,10 @@ array_agg_transfn(PG_FUNCTION_ARGS)
495
495
((AggState * ) fcinfo -> context )-> aggcontext );
496
496
497
497
/*
498
- * We cheat quite a lot here by assuming that a pointer datum will be
499
- * preserved intact when nodeAgg.c thinks it is a value of type "internal".
500
- * This will in fact work because internal is stated to be pass-by-value
501
- * in pg_type.h, and nodeAgg will never do anything with a pass-by-value
502
- * transvalue except pass it around in Datum form. But it's mighty
503
- * shaky seeing that internal is also stated to be 4 bytes wide in
504
- * pg_type.h. If nodeAgg did put the value into a tuple this would
505
- * crash and burn on 64-bit machines.
498
+ * The transition type for array_agg() is declared to be "internal",
499
+ * which is a pass-by-value type the same size as a pointer. So we
500
+ * can safely pass the ArrayBuildState pointer through nodeAgg.c's
501
+ * machinations.
506
502
*/
507
503
PG_RETURN_POINTER (state );
508
504
}
Original file line number Diff line number Diff line change 42
42
* Portions Copyright (c) 1994, Regents of the University of California
43
43
* Portions taken from FreeBSD.
44
44
*
45
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.163 2008/10/31 07:15:11 petere Exp $
45
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.164 2008/11/14 02:09:51 tgl Exp $
46
46
*
47
47
*-------------------------------------------------------------------------
48
48
*/
@@ -1331,6 +1331,12 @@ bootstrap_template1(char *short_version)
1331
1331
sprintf (buf , "%d" , NAMEDATALEN );
1332
1332
bki_lines = replace_token (bki_lines , "NAMEDATALEN" , buf );
1333
1333
1334
+ sprintf (buf , "%d" , (int ) sizeof (Pointer ));
1335
+ bki_lines = replace_token (bki_lines , "SIZEOF_POINTER" , buf );
1336
+
1337
+ bki_lines = replace_token (bki_lines , "ALIGNOF_POINTER" ,
1338
+ (sizeof (Pointer ) == 4 ) ? "i" : "d" );
1339
+
1334
1340
bki_lines = replace_token (bki_lines , "FLOAT4PASSBYVAL" ,
1335
1341
FLOAT4PASSBYVAL ? "true" : "false" );
1336
1342
Original file line number Diff line number Diff line change 37
37
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
38
38
* Portions Copyright (c) 1994, Regents of the University of California
39
39
*
40
- * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.506 2008/11/14 00:51:46 tgl Exp $
40
+ * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.507 2008/11/14 02:09:51 tgl Exp $
41
41
*
42
42
*-------------------------------------------------------------------------
43
43
*/
53
53
*/
54
54
55
55
/* yyyymmddN */
56
- #define CATALOG_VERSION_NO 200811132
56
+ #define CATALOG_VERSION_NO 200811133
57
57
58
58
#endif
Original file line number Diff line number Diff line change 8
8
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
9
9
* Portions Copyright (c) 1994, Regents of the University of California
10
10
*
11
- * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.201 2008/10/13 16:25:20 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.202 2008/11/14 02:09:52 tgl Exp $
12
12
*
13
13
* NOTES
14
14
* the genbki.sh script reads this file and generates .bki
@@ -613,7 +613,7 @@ DATA(insert OID = 2279 ( trigger PGNSP PGUID 4 t p P f t \054 0 0 0 trigger_in
613
613
#define TRIGGEROID 2279
614
614
DATA (insert OID = 2280 ( language_handler PGNSP PGUID 4 t p P f t \054 0 0 0 language_handler_in language_handler_out - - - - - i p f 0 - 1 0 _null_ _null_ ));
615
615
#define LANGUAGE_HANDLEROID 2280
616
- DATA (insert OID = 2281 ( internal PGNSP PGUID 4 t p P f t \054 0 0 0 internal_in internal_out - - - - - i p f 0 - 1 0 _null_ _null_ ));
616
+ DATA (insert OID = 2281 ( internal PGNSP PGUID SIZEOF_POINTER t p P f t \054 0 0 0 internal_in internal_out - - - - - ALIGNOF_POINTER p f 0 - 1 0 _null_ _null_ ));
617
617
#define INTERNALOID 2281
618
618
DATA (insert OID = 2282 ( opaque PGNSP PGUID 4 t p P f t \054 0 0 0 opaque_in opaque_out - - - - - i p f 0 - 1 0 _null_ _null_ ));
619
619
#define OPAQUEOID 2282
You can’t perform that action at this time.
0 commit comments