diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/c.h | 6 | ||||
-rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_attribute.h | 14 | ||||
-rw-r--r-- | src/include/catalog/pg_type.h | 4 | ||||
-rw-r--r-- | src/include/postgres.h | 57 |
5 files changed, 17 insertions, 68 deletions
diff --git a/src/include/c.h b/src/include/c.h index f9b0acf9571..e2697099cbd 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.224 2008/03/17 19:44:41 petere Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.225 2008/04/18 18:43:09 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -253,8 +253,8 @@ typedef uint32 bits32; /* >= 32 bits */ * Floating point number, AT LEAST N BITS IN SIZE, * used for numerical computations. * - * Since sizeof(floatN) may be > sizeof(char *), always pass - * floatN by reference. + * Since sizeof(float8) may be > sizeof(char *), always pass + * float8 by reference. float4 is passed by value. * * XXX: these typedefs are now deprecated in favor of float4 and float8. * They will eventually go away. diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index f80d918c656..83c0dbd3694 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * 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.448 2008/04/14 17:05:33 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.449 2008/04/18 18:43:09 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200804141 +#define CATALOG_VERSION_NO 200804181 #endif diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 2a39d2a6b99..08b18da37d6 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -8,7 +8,7 @@ * 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_attribute.h,v 1.135 2008/03/27 03:57:34 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.136 2008/04/18 18:43:09 alvherre Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -287,8 +287,8 @@ DATA(insert ( 1247 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0)); { 1255, {"pronamespace"}, 26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1255, {"proowner"}, 26, -1, 4, 3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1255, {"prolang"}, 26, -1, 4, 4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ -{ 1255, {"procost"}, 700, -1, 4, 5, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \ -{ 1255, {"prorows"}, 700, -1, 4, 6, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \ +{ 1255, {"procost"}, 700, -1, 4, 5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ +{ 1255, {"prorows"}, 700, -1, 4, 6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1255, {"proisagg"}, 16, -1, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \ { 1255, {"prosecdef"}, 16, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \ { 1255, {"proisstrict"}, 16, -1, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \ @@ -309,8 +309,8 @@ DATA(insert ( 1255 proname 19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0)); DATA(insert ( 1255 pronamespace 26 -1 4 2 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1255 proowner 26 -1 4 3 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1255 prolang 26 -1 4 4 0 -1 -1 t p i t f f t 0)); -DATA(insert ( 1255 procost 700 -1 4 5 0 -1 -1 f p i t f f t 0)); -DATA(insert ( 1255 prorows 700 -1 4 6 0 -1 -1 f p i t f f t 0)); +DATA(insert ( 1255 procost 700 -1 4 5 0 -1 -1 t p i t f f t 0)); +DATA(insert ( 1255 prorows 700 -1 4 6 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1255 proisagg 16 -1 1 7 0 -1 -1 t p c t f f t 0)); DATA(insert ( 1255 prosecdef 16 -1 1 8 0 -1 -1 t p c t f f t 0)); DATA(insert ( 1255 proisstrict 16 -1 1 9 0 -1 -1 t p c t f f t 0)); @@ -395,7 +395,7 @@ DATA(insert ( 1249 tableoid 26 0 4 -7 0 -1 -1 t p i t f f t 0)); { 1259, {"relfilenode"}, 26, -1, 4, 6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1259, {"reltablespace"}, 26, -1, 4, 7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1259, {"relpages"}, 23, -1, 4, 8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ -{ 1259, {"reltuples"}, 700, -1, 4, 9, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \ +{ 1259, {"reltuples"}, 700, -1, 4, 9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1259, {"reltoastrelid"}, 26, -1, 4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1259, {"reltoastidxid"}, 26, -1, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \ { 1259, {"relhasindex"}, 16, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \ @@ -423,7 +423,7 @@ DATA(insert ( 1259 relam 26 -1 4 5 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1259 relfilenode 26 -1 4 6 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1259 reltablespace 26 -1 4 7 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1259 relpages 23 -1 4 8 0 -1 -1 t p i t f f t 0)); -DATA(insert ( 1259 reltuples 700 -1 4 9 0 -1 -1 f p i t f f t 0)); +DATA(insert ( 1259 reltuples 700 -1 4 9 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1259 reltoastrelid 26 -1 4 10 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1259 reltoastidxid 26 -1 4 11 0 -1 -1 t p i t f f t 0)); DATA(insert ( 1259 relhasindex 16 -1 1 12 0 -1 -1 t p c t f f t 0)); diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 8f2ca40093f..2c98f2b5466 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -8,7 +8,7 @@ * 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.193 2008/03/27 03:57:34 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.194 2008/04/18 18:43:09 alvherre Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -368,7 +368,7 @@ DESCR(""); /* OIDS 700 - 799 */ -DATA(insert OID = 700 ( float4 PGNSP PGUID 4 f b t \054 0 0 1021 float4in float4out float4recv float4send - - - i p f 0 -1 0 _null_ _null_ )); +DATA(insert OID = 700 ( float4 PGNSP PGUID 4 t b t \054 0 0 1021 float4in float4out float4recv float4send - - - i p f 0 -1 0 _null_ _null_ )); DESCR("single-precision floating point number, 4-byte storage"); #define FLOAT4OID 700 DATA(insert OID = 701 ( float8 PGNSP PGUID 8 f b t \054 0 0 1022 float8in float8out float8recv float8send - - - d p f 0 -1 0 _null_ _null_ )); diff --git a/src/include/postgres.h b/src/include/postgres.h index 3c4f414f643..40ecd451a85 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1995, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/postgres.h,v 1.89 2008/03/27 03:57:34 tgl Exp $ + * $PostgreSQL: pgsql/src/include/postgres.h,v 1.90 2008/04/18 18:43:09 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -546,18 +546,13 @@ extern Datum Int64GetDatum(int64 X); /* * DatumGetFloat4 * Returns 4-byte floating point value of a datum. - * - * Note: this macro hides the fact that float4 is currently a - * pass-by-reference type. Someday it may be pass-by-value. */ -#define DatumGetFloat4(X) (* ((float4 *) DatumGetPointer(X))) +extern float4 DatumGetFloat4(Datum X); /* * Float4GetDatum * Returns datum representation for a 4-byte floating point number. - * - * Note: this routine returns a reference to palloc'd space. */ extern Datum Float4GetDatum(float4 X); @@ -584,56 +579,11 @@ extern Datum Float8GetDatum(float8 X); /* - * DatumGetFloat32 - * Returns 32-bit floating point value of a datum. - * This is really a pointer, of course. - * - * XXX: this macro is now deprecated in favor of DatumGetFloat4. - * It will eventually go away. - */ - -#define DatumGetFloat32(X) ((float32) DatumGetPointer(X)) - -/* - * Float32GetDatum - * Returns datum representation for a 32-bit floating point number. - * This is really a pointer, of course. - * - * XXX: this macro is now deprecated in favor of Float4GetDatum. - * It will eventually go away. - */ - -#define Float32GetDatum(X) PointerGetDatum(X) - -/* - * DatumGetFloat64 - * Returns 64-bit floating point value of a datum. - * This is really a pointer, of course. - * - * XXX: this macro is now deprecated in favor of DatumGetFloat8. - * It will eventually go away. - */ - -#define DatumGetFloat64(X) ((float64) DatumGetPointer(X)) - -/* - * Float64GetDatum - * Returns datum representation for a 64-bit floating point number. - * This is really a pointer, of course. - * - * XXX: this macro is now deprecated in favor of Float8GetDatum. - * It will eventually go away. - */ - -#define Float64GetDatum(X) PointerGetDatum(X) - -/* * Int64GetDatumFast - * Float4GetDatumFast * Float8GetDatumFast * * These macros are intended to allow writing code that does not depend on - * whether int64, float4, float8 are pass-by-reference types, while not + * whether int64, float8 are pass-by-reference types, while not * sacrificing performance when they are. The argument must be a variable * that will exist and have the same value for as long as the Datum is needed. * In the pass-by-ref case, the address of the variable is taken to use as @@ -642,7 +592,6 @@ extern Datum Float8GetDatum(float8 X); */ #define Int64GetDatumFast(X) PointerGetDatum(&(X)) -#define Float4GetDatumFast(X) PointerGetDatum(&(X)) #define Float8GetDatumFast(X) PointerGetDatum(&(X)) |