* Copyright (c) 2003-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.25 2008/11/14 00:12:08 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.26 2008/11/14 02:09:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
((AggState *) fcinfo->context)->aggcontext);
/*
- * We cheat quite a lot here by assuming that a pointer datum will be
- * preserved intact when nodeAgg.c thinks it is a value of type "internal".
- * This will in fact work because internal is stated to be pass-by-value
- * in pg_type.h, and nodeAgg will never do anything with a pass-by-value
- * transvalue except pass it around in Datum form. But it's mighty
- * shaky seeing that internal is also stated to be 4 bytes wide in
- * pg_type.h. If nodeAgg did put the value into a tuple this would
- * crash and burn on 64-bit machines.
+ * The transition type for array_agg() is declared to be "internal",
+ * which is a pass-by-value type the same size as a pointer. So we
+ * can safely pass the ArrayBuildState pointer through nodeAgg.c's
+ * machinations.
*/
PG_RETURN_POINTER(state);
}
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.163 2008/10/31 07:15:11 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.164 2008/11/14 02:09:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
sprintf(buf, "%d", NAMEDATALEN);
bki_lines = replace_token(bki_lines, "NAMEDATALEN", buf);
+ sprintf(buf, "%d", (int) sizeof(Pointer));
+ bki_lines = replace_token(bki_lines, "SIZEOF_POINTER", buf);
+
+ bki_lines = replace_token(bki_lines, "ALIGNOF_POINTER",
+ (sizeof(Pointer) == 4) ? "i" : "d");
+
bki_lines = replace_token(bki_lines, "FLOAT4PASSBYVAL",
FLOAT4PASSBYVAL ? "true" : "false");
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.506 2008/11/14 00:51:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.507 2008/11/14 02:09:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200811132
+#define CATALOG_VERSION_NO 200811133
#endif
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.201 2008/10/13 16:25:20 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.202 2008/11/14 02:09:52 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
#define TRIGGEROID 2279
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_ ));
#define LANGUAGE_HANDLEROID 2280
-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_ ));
+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_ ));
#define INTERNALOID 2281
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_ ));
#define OPAQUEOID 2282