|
Home > Archive > PostgreSQL Bugs > June 2005 > Re: BUG in temp tables involving a temp table not properly
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: BUG in temp tables involving a temp table not properly
|
|
| Stephan Szabo 2005-06-07, 11:24 am |
|
On Tue, 7 Jun 2005, Frank van Vugt wrote:
> Looking forward to your analysis of the following bug:
You've analyzed the situation incorrectly I believe.
> -- however, the following query will happily run AND return a wrong result
> -- based on the regular table instead of the temporary one
> select count(*) from full_sequence(1, 100) where id in (select id from f1);
In this query in the subselect the id column is an outer
reference to the id column generated from full_sequence. As far as I can
see, as long as there is at least one row in f1, all the rows generated by
full_sequence will match since it will compare the id in the outer row
against itself (and they are non null). This behavior is marginally
unfortunate, but seems to be required by spec.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
| |
| Frank van Vugt 2005-06-07, 11:24 am |
| Ouch,
SS> You've analyzed the situation incorrectly I believe.
SS> In this query in the subselect the id column is an outer reference to
SS> the id column generated from full_sequence.
TL> This is not a bug, it is user error.
TL> The actual problem here is that "id" is a perfectly valid outer reference
You're right, now why didn't I see that myself.... ;)
Sorry to have bothered you guys / the list!
--
Best,
Frank.
an Oost 102-008
5013 CD Tilburg
Tel: (+31).13.5425551, Fax: (+31).13.5452087
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D
Would you buy a car with the hood welded shut? (Linux, the maintainable OS)
This is Unix Country. On a quiet night you can hear NT reboot.
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D
De in dit emailbericht verstrekte informatie is vertrouwelijk en uitsluiten=
d=20
bestemd voor de geadresseerde. Het kopi=EBren van of verstrekken aan en geb=
ruik=20
door derden van deze informatie is niet toegestaan. Door de elektronische=20
verzending van dit bericht kunnen er geen rechten worden ontleend aan de=20
informatie.
This email and any files transmitted with it are confidential and intended=
=20
solely for the use of the individual or entity to whom they are addressed.
Copyright (c) 2005 Foxi C.i.T. BV All world wide rights reserved.
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D
D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|
|
|
|
|