Thread: Select Statements freeze.

Select Statements freeze.

From
"Axel Spallek"
Date:
Hi.
With the following you can sometimes kill (but always slow down) the psql-S=
erver.

select=20
table1.a,
table1.b
from table2;

I had that problem with this one:

CREATE VIEW akdsummon AS=20

SELECT=20

akdsummonpre.kundennr,=20

(sum(akdsummonpre.SummeGGRKR))::numeric(9,2) as UmsSum,

akdsummonpre.mmon,=20

akdsummonpre.myear=20

FROM auftraege

GROUP BY akdsummonpre.kundennr,=20

akdsummonpre.mmon,=20

akdsummonpre.myear=20

;





I simply forgot to change the auftraege into akdsummonpre.

The bad thing is, that pgadmin hangs too as soon as you leftclick such a vi=
ew.

After PGAdmin hangs, you even can't drop that view by psql.

IMHO the backend should report a "Table table1 not found in from part of th=
e query."

And then it should quit!



Sincerly

Axel Spallek

Re: Select Statements freeze.

From
Stephan Szabo
Date:
On Thu, 24 Apr 2003, Axel Spallek wrote:

> Hi.
> With the following you can sometimes kill (but always slow down) the psql-Server.
>
> select
> table1.a,
> table1.b
> from table2;
>
> I had that problem with this one:
>
> CREATE VIEW akdsummon AS
>
> SELECT
>
> akdsummonpre.kundennr,
>
> (sum(akdsummonpre.SummeGGRKR))::numeric(9,2) as UmsSum,
>
> akdsummonpre.mmon,
>
> akdsummonpre.myear
>
> FROM auftraege
>
> GROUP BY akdsummonpre.kundennr,
>
> akdsummonpre.mmon,
>
> akdsummonpre.myear
>
> ;

Postgresql has an extension which tries to treat this as
from auftraege, akdsummonpre with no join condition.