summaryrefslogtreecommitdiff
path: root/contrib/uuid-ossp/uuid-ossp.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/uuid-ossp/uuid-ossp.c')
-rw-r--r--contrib/uuid-ossp/uuid-ossp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c
index 57bdf4d8d4..1ce08555cf 100644
--- a/contrib/uuid-ossp/uuid-ossp.c
+++ b/contrib/uuid-ossp/uuid-ossp.c
@@ -503,13 +503,13 @@ Datum
uuid_generate_v3(PG_FUNCTION_ARGS)
{
pg_uuid_t *ns = PG_GETARG_UUID_P(0);
- text *name = PG_GETARG_TEXT_P(1);
+ text *name = PG_GETARG_TEXT_PP(1);
#ifdef HAVE_UUID_OSSP
return uuid_generate_v35_internal(UUID_MAKE_V3, ns, name);
#else
return uuid_generate_internal(UUID_MAKE_V3, (unsigned char *) ns,
- VARDATA(name), VARSIZE(name) - VARHDRSZ);
+ VARDATA_ANY(name), VARSIZE_ANY_EXHDR(name));
#endif
}
@@ -525,12 +525,12 @@ Datum
uuid_generate_v5(PG_FUNCTION_ARGS)
{
pg_uuid_t *ns = PG_GETARG_UUID_P(0);
- text *name = PG_GETARG_TEXT_P(1);
+ text *name = PG_GETARG_TEXT_PP(1);
#ifdef HAVE_UUID_OSSP
return uuid_generate_v35_internal(UUID_MAKE_V5, ns, name);
#else
return uuid_generate_internal(UUID_MAKE_V5, (unsigned char *) ns,
- VARDATA(name), VARSIZE(name) - VARHDRSZ);
+ VARDATA_ANY(name), VARSIZE_ANY_EXHDR(name));
#endif
}