Re: When do we lose column names?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: When do we lose column names?
Date: 2012-02-07 01:33:08
Message-ID: 4F307F54.5020608@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/16/2011 10:38 PM, Tom Lane wrote:
> I wrote:
>> PFC, a patch that does this.
> Upon further review, this patch would need some more work even for the
> RowExpr case, because there are several places that build RowExprs
> without bothering to build a valid colnames list. It's clearly soluble
> if anyone cares to put in the work, but I'm not personally excited
> enough to pursue it ...

The patch itself causes a core dump with the current regression tests.
This test:

SELECT array_to_json(array_agg(q),false)
FROM ( SELECT $$a$$ || x AS b, y AS c,
ARRAY[ROW(x.*,ARRAY[1,2,3]),
ROW(y.*,ARRAY[4,5,6])] AS z
FROM generate_series(1,2) x,
generate_series(4,5) y) q;

causes a failure at line 967 of execTuples.c:

Assert(list_length(exprList) == list_length(namesList));

I'm investigating further.

I've been looking at the other places that build RowExprs. Most of them
look OK and none seem clearly in need of fixing at first glance. Which
do you think need attention?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Scales 2012-02-07 05:09:53 Re: double writes using "double-write buffer" approach [WIP]
Previous Message Bruce Momjian 2012-02-07 00:21:22 Re: Progress on fast path sorting, btree index creation time