Re: BUG #15653: pg_detoast_datum_packed problem

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: gmail Vladimir Koković <vladimir(dot)kokovic(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15653: pg_detoast_datum_packed problem
Date: 2019-03-08 19:15:43
Message-ID: 87a7i5b2ok.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "gmail" == gmail Vladimir Koković <vladimir(dot)kokovic(at)gmail(dot)com> writes:

gmail>   VarChar *arg = PG_GETARG_VARCHAR_PP(0);

The _PP there means that this is allowed to return either a packed
(short) varlena or a normal one...

gmail>     len = VARSIZE( arg ) - VARHDRSZ;

...but VARSIZE is only allowed on unpacked varlenas, you need to use
VARSIZE_ANY_EXHDR instead (and VARDATA_ANY rather than VARDATA).

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-03-08 20:06:45 BUG #15679: Partial HASH index takes too much space
Previous Message gmail Vladimir Koković 2019-03-08 18:47:41 Re: BUG #15653: pg_detoast_datum_packed problem