Re: ERROR: "failed to locate grouping columns"

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ERROR: "failed to locate grouping columns"
Date: 2009-03-08 20:29:21
Message-ID: 1236544161.20435.277.camel@guedes-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em Sáb, 2009-03-07 às 19:38 -0500, Tom Lane escreveu:
> I really have a hard time believing that whether you get that error is
> contingent on whether the view returns some rows or not. That's a
> planner message and couldn't possibly have to do with what happens
> at runtime.

Well, today I have more time to study the environment and I'd see that
was a coincidence in the fact that when the grouping by in the view
works fine and it was returning values, it was tested in a 8.1.4 PG
version.

Now I made a complete test in 8.1.4 and 8.3.6. In the first the error
not occurs, in the last yes.

> Would you put together a complete example, instead of leaving us to
> guess what's underlying the view? And what PG version is this?

Attached there is a dump with the tables and views related:

vw_cnt_vnc_tst -> is my view before I changed sub-selects to JOIN

vw_that_works - an example view that works without grouping some columns
vw_that_not_works -> an example view that throws an error

thanks.
--
Dickson S. Guedes
-
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://planeta.postgresql.org.br

Attachment Content-Type Size
test_error_failed_to_locate_grouping_columns.dmp.gz application/x-gzip 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-03-08 20:34:12 Re: ERROR: "failed to locate grouping columns"
Previous Message Robert Lor 2009-03-08 20:07:26 Re: Additional DTrace Probes