diff options
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/builtins.h | 18 | ||||
| -rw-r--r-- | src/include/utils/uuid.h | 27 |
2 files changed, 44 insertions, 1 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 3368e2c024..aee4095654 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.286 2007/01/16 21:41:14 neilc Exp $ + * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.287 2007/01/28 16:16:54 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -926,4 +926,20 @@ extern Datum pg_prepared_statement(PG_FUNCTION_ARGS); /* utils/mmgr/portalmem.c */ extern Datum pg_cursor(PG_FUNCTION_ARGS); +/* uuid.c */ +extern Datum uuid_in(PG_FUNCTION_ARGS); +extern Datum uuid_out(PG_FUNCTION_ARGS); +extern Datum uuid_send(PG_FUNCTION_ARGS); +extern Datum uuid_recv(PG_FUNCTION_ARGS); +extern Datum uuid_lt(PG_FUNCTION_ARGS); +extern Datum uuid_le(PG_FUNCTION_ARGS); +extern Datum uuid_eq(PG_FUNCTION_ARGS); +extern Datum uuid_ge(PG_FUNCTION_ARGS); +extern Datum uuid_gt(PG_FUNCTION_ARGS); +extern Datum uuid_ne(PG_FUNCTION_ARGS); +extern Datum uuid_cmp(PG_FUNCTION_ARGS); +extern Datum uuid_hash(PG_FUNCTION_ARGS); +extern Datum text_uuid(PG_FUNCTION_ARGS); +extern Datum uuid_text(PG_FUNCTION_ARGS); + #endif /* BUILTINS_H */ diff --git a/src/include/utils/uuid.h b/src/include/utils/uuid.h new file mode 100644 index 0000000000..12cb00a0b7 --- /dev/null +++ b/src/include/utils/uuid.h @@ -0,0 +1,27 @@ +/*------------------------------------------------------------------------- + * + * uuid.h + * Header file for the "uuid" data type. + * + * Copyright (c) 2007, PostgreSQL Global Development Group + * + * $PostgreSQL: pgsql/src/include/utils/uuid.h,v 1.1 2007/01/28 16:16:54 neilc Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef UUID_H +#define UUID_H + +/* guid size in bytes */ +#define UUID_LEN 16 + +/* opaque struct; defined in uuid.c */ +typedef struct uuid_t uuid_t; + +/* fmgr interface macros */ +#define UUIDPGetDatum(X) PointerGetDatum(X) +#define PG_RETURN_UUID_P(X) return UUIDPGetDatum(X) +#define DatumGetUUIDP(X) ((uuid_t *) DatumGetPointer(X)) +#define PG_GETARG_UUID_P(X) DatumGetUUIDP(PG_GETARG_DATUM(X)) + +#endif /* UUID_H */ |
