BUG?

From: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: pgsql-general(at)postgresql(dot)org
Subject: BUG?
Date: 2003-11-08 13:35:49
Message-ID: 200311081035.49992.martin@bugs.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
-----------------------------------------------------------------

Responses

  • Re: BUG? at 2003-11-08 14:03:06 from Peter Eisentraut
  • Re: BUG? at 2003-11-08 14:07:33 from Martijn van Oosterhout

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2003-11-08 14:03:06 Re: BUG?
Previous Message fuzzy 2003-11-08 12:37:54 postgresql ODBC for Windows!