diff options
Diffstat (limited to 'contrib/hstore_plperl/hstore_plperl.c')
-rw-r--r-- | contrib/hstore_plperl/hstore_plperl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/hstore_plperl/hstore_plperl.c b/contrib/hstore_plperl/hstore_plperl.c index fbbb4c8e762..d40a7927307 100644 --- a/contrib/hstore_plperl/hstore_plperl.c +++ b/contrib/hstore_plperl/hstore_plperl.c @@ -27,8 +27,11 @@ hstore_to_plperl(PG_FUNCTION_ARGS) const char *key; SV *value; - key = pnstrdup(HS_KEY(entries, base, i), HS_KEYLEN(entries, i)); - value = HS_VALISNULL(entries, i) ? newSV(0) : cstr2sv(pnstrdup(HS_VAL(entries, base, i), HS_VALLEN(entries, i))); + key = pnstrdup(HSTORE_KEY(entries, base, i), + HSTORE_KEYLEN(entries, i)); + value = HSTORE_VALISNULL(entries, i) ? newSV(0) : + cstr2sv(pnstrdup(HSTORE_VAL(entries, base, i), + HSTORE_VALLEN(entries, i))); (void) hv_store(hv, key, strlen(key), value, 0); } |