BUG? - Mailing list pgsql-general

From Martin Marques
Subject BUG?
Date
Msg-id 200311081035.49992.martin@bugs.unl.edu.ar
Whole thread Raw
Responses Re: BUG?  (Peter Eisentraut <peter_e@gmx.net>)
Re: BUG?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Look at the NOTICE:

siprebi=> SELECT max(tprestamo.cantmaxpres) FROM  tprestamo t,usuarios
u,personas p,objetos o, tipodoc td  WHERE t.cateusuario = u.cateusuario AND
u.persona = p.codigo AND p.docnum = 23622139 AND p.tdocu = td.codigo AND
td.nombre = 1 AND t.cateobjeto = o.cateobjeto AND o.ninventario = 29 AND
o.uacademi = 4;
NOTICE:  Adding missing FROM-clause entry for table "tprestamo"

Now, look at the exact same query, only changing the field in max(), which is
the same, only that I use the alias of the table:

siprebi=> SELECT max(t.cantmaxpres) FROM  tprestamo t,usuarios u,personas
p,objetos o, tipodoc td  WHERE t.cateusuario = u.cateusuario AND  u.persona =
p.codigo AND p.docnum = 23622139 AND p.tdocu = td.codigo AND  td.nombre = 1
AND t.cateobjeto = o.cateobjeto AND o.ninventario = 29 AND  o.uacademi = 4;
 max
-----

Looks like a bug.

siprebi=> select version();
                                   version
------------------------------------------------------------------------------
 PostgreSQL 7.3.2 on sparc-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.2.3
(1 row)


--
 10:33:01 up 17 days, 17:55,  3 users,  load average: 0.34, 0.41, 0.41
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador
             Universidad Nacional
                  del Litoral
-----------------------------------------------------------------


pgsql-general by date:

Previous
From: "Birahim FALL"
Date:
Subject: RE : Visio Like Tool....
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG?