| From: | Hadi Moshayedi <hadi(at)moshayedi(dot)net> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Ozgun Erdogan <ozgun(at)citusdata(dot)com> |
| Subject: | pglz_decompress() |
| Date: | 2014-02-27 20:59:35 |
| Message-ID: | CAK=1=WqC2+=vHFrsPPwKV+-k+EKNi+V2UPSEHwzn4oeguLLyng@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello,
The comments in pg_lzcompress.c say that:
* If VARSIZE(x) == rawsize + sizeof(PGLZ_Header), then the data
* is stored uncompressed as plain bytes. Thus, the decompressor
* simply copies rawsize bytes from the location after the
* header to the destination.
But pg_lzdecompress doesn't seem to check explicitly for the VARSIZE(x) ==
rawsize + sizeof(PGLZ_Header) condition. Is it caller's responsibility to
check for this condition before calling pg_lzdecompress(), or does it
happen somehow in pg_lzdecompress()?
Thanks,
-- Hadi
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Fetter | 2014-02-27 21:08:11 | Re: [pgsql-advocacy] GSoC 2014 - mentors, students and admins |
| Previous Message | Andrew Dunstan | 2014-02-27 20:06:33 | Re: jsonb and nested hstore |