Header And Logo

PostgreSQL
| The world's most advanced open source database.

uuid.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * uuid.h
00004  *    Header file for the "uuid" ADT. In C, we use the name pg_uuid_t,
00005  *    to avoid conflicts with any uuid_t type that might be defined by
00006  *    the system headers.
00007  *
00008  * Copyright (c) 2007-2013, PostgreSQL Global Development Group
00009  *
00010  * src/include/utils/uuid.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef UUID_H
00015 #define UUID_H
00016 
00017 /* guid size in bytes */
00018 #define UUID_LEN 16
00019 
00020 /* opaque struct; defined in uuid.c */
00021 typedef struct pg_uuid_t pg_uuid_t;
00022 
00023 /* fmgr interface macros */
00024 #define UUIDPGetDatum(X)        PointerGetDatum(X)
00025 #define PG_RETURN_UUID_P(X)     return UUIDPGetDatum(X)
00026 #define DatumGetUUIDP(X)        ((pg_uuid_t *) DatumGetPointer(X))
00027 #define PG_GETARG_UUID_P(X)     DatumGetUUIDP(PG_GETARG_DATUM(X))
00028 
00029 #endif   /* UUID_H */