Re: row_to_json bug with index only scans: empty keys!

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ross Reedstrom <reedstrm(at)rice(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: row_to_json bug with index only scans: empty keys!
Date: 2014-11-08 00:06:41
Message-ID: 545D5E91.9020705@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 11/07/2014 04:59 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 11/07/2014 10:51 AM, Ross Reedstrom wrote:
>>> row_to_json() yields empty strings for json keys if the data is
>>> fulfilled by an index only scan.
>> Could this be a bug in lookup_rowtype_tupdesc()?
> I think this is probably a variant of bug #11210, in which the problem is
> that tupledescs bubbled up from inheritance children never get column
> names assigned to them. I've been speculating about ways to fix that
> but I've not thought of anything that's not kinda painful.

Yeah, I've been running this down a bit with a debugger, and it looked
kinda like that. Maybe we should look for this in places we know it
matters (e.g. hstore_from_record() and composite_to_json() and raise an
error if we find empty names, with a hint to do (what?).

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2014-11-08 00:07:51 Re: tracking commit timestamps
Previous Message Petr Jelinek 2014-11-07 23:57:41 Re: Sequence Access Method WIP