From: | Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Bug? |
Date: | 2001-08-10 23:58:54 |
Message-ID: | 0108102058540B.15878@bugs |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
What's wrong with this query that used to work great:
webunl=> SELECT DISTINCT count(*),id_curso AS LINK,titulo AS
TITULO_CARRERA,admin_view_facultades.nombre AS FACULTAD,
webunl-> duracion/12 AS DURACION FROM admin_view, admin_view_facultades
webunl-> WHERE admin_view_facultades.id_carrera=admin_view.id_curso
webunl-> GROUP BY id_curso,titulo,admin_view_facultades.nombre,duracion/12
webunl-> ORDER BY id_curso ASC LIMIT 20 OFFSET 0 ;
count | link | titulo_carrera | facultad
| duracion
-------+------+-----------------------------+--------------------------------+----------
1 | 1 | Ingenieria en informatica | Facultad de Ingenier<ED>a
Qu<ED>mica | 4
1 | 2 | Licenciatura en Matematicas | Facultad de Ingenier<ED>a
Qu<ED>mica | 4
(2 rows)
webunl=>
As you can see count(*) is 1, even seeing 2 rows selected. What's wrong?
All that chenged is that I recompiled postgreSQL 7.1.2 with the patch from
the rewriteHandler.c file.
--
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués | mmarques(at)unl(dot)edu(dot)ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2001-08-11 00:17:26 | Re: PL/pgSQL bug? |
Previous Message | Allan Engelhardt | 2001-08-10 22:14:46 | Re: Comparing tables in different db's |