Re: Query breaking with unknown expression type (lost s

Поиск
Список
Период
Сортировка
От Matthew Gabeler-Lee
Тема Re: Query breaking with unknown expression type (lost s
Дата
Msg-id ABABFB80F35AD311848B0090279918EF010B9B68@ZYCOSNT2.hq.zycos.com
обсуждение исходный текст
Ответы Re: Query breaking with unknown expression type (lost s  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Sorry 'bout that ...

Here's a test script that is as simple a setup as I've yet found that
reproduces this bug.

create table t1 (k int4, t1c int4);
create table t2 (k int4, t2c int4);
create table t3 (k int4, t3c int4);

insert into t1 values (1, 2);
insert into t2 values (1, 3);
insert into t3 values (1, 4);

-- triggers bug
select * from (select t1.*, (select t2.c from t2 limit 1) as v from t1) t1v
natural left join t3;

-- triggers bug
select * from (select t1.*, (select t2.t2c from t2 limit 1) as v from t1)
t1v
natural inner join t3 where t1v.t1c > 1 and (t3.t3c > 3 or t3.t3c is null);

-- does *not* trigger bug
select * from (select t1.*, (select t2.t2c from t2 limit 1) as v from t1)
t1v
natural right join t3;

    -Matt


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, December 04, 2002 16:37
To: Matthew Gabeler-Lee
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Query breaking with unknown expression type (lost
subquery from v iew?)


Matthew Gabeler-Lee <mgabelerlee@zycos.com> writes:
> Query, used to work in 7.2.3:
> SELECT * from VResults NATURAL LEFT JOIN qrp_events
> WHERE qrp_score > 45 AND qry_charge < 3 AND vst_valstate IS NULL
>   AND (
>     (qpe_name = 'autoval.pl' AND qpe_version < 3)
>     OR qpe_name IS NULL
>   )
> ORDER BY sdt_id ASC, qry_num ASC, qrp_pnum ASC

> If that means subquery, there is a subquery in
> the VResults view, but for some reason that subquery isn't showing up in
the
> explain output!

How do you expect us to debug this when you haven't provided the view
definition?

I'm willing to dig into it if I have a test case to look at, but I don't
have time to try to intuit a test case from an incomplete bug report.
Give me a script to reproduce the failure, please.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Segmentation fault in 7.3 while vacuuming
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Problem compiling 7.3