From: | SZŰCS Gábor <surrano(at)mailbox(dot)hu> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Cc: | <TIR(at)yahoogroups(dot)com> |
Subject: | 7.4 aggregate OR TRUE yields strange results |
Date: | 2004-02-13 17:16:47 |
Message-ID: | 028401c3f255$2978cb30$0403a8c0@fejleszt4 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Dear Gurus,
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Gabor Szucs
Your email address : surrano(at)mailbox(dot)hu
============================================================================
System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium 2
Operating System (example: Linux 2.0.26 ELF) : Debian "Woody" 2.4.18 Elf
PostgreSQL version (example: PostgreSQL-7.4): PostgreSQL-7.4.1
Compiler used (example: gcc 2.95.2) : gcc 2.95.4
============================================================================
Please enter a FULL description of your problem:
------------------------------------------------
We compiled the source with one modification: max function params needed to
be raised to 64.
Dumped the db from 7.3.3 and fed it to psql 7.4.1. (dunno if this may be
relevant).
SELECT count(*)<0 OR TRUE FROM mytable WHERE condition
dumps the whole tuples meeting the condition. Same with other aggregates
such as
SELECT max(az)<5 OR true FROM mytable
I'd be honoured to get some info if this has been reported (haven't found
anything in latest weeks of BUGS) and what's the current status or
explanation of this behaviour.
============================================================================
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Below is the whole relevant dump of a simple example.
Note that the columns in the last query _do_not_have_names_!
I re-checked with \x.
TIA,
G.
%----------------------- cut here -----------------------%
\end
[local]:tir=# \d tetelcsoport
Table "public.tetelcsoport"
Column | Type | Modifiers
--------+-------------------+-----------------------------------------------
---------------
az | integer | not null default
nextval('public.tetelcsoport_az_seq'::text)
nev | character varying |
Indexes:
"tetelcsoport_pkey" primary key, btree (az)
[local]:tir=# select * from tetelcsoport;
az | nev
----+-----------
1 | göngyöleg
2 | szerszám
(2 rows)
[local]:tir=# select (max(az)<5) from tetelcsoport;
?column?
----------
t
(1 row)
[local]:tir=# select (max(az)<5) or true from tetelcsoport;
|
---+-----------
1 | göngyöleg
2 | szerszám
(2 rows)
[local]:tir=# select (max(az)<5) or true from tetelcsoport where az=1;
|
---+-----------
1 | göngyöleg
(1 row)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-02-13 22:02:53 | Re: 7.4 aggregate OR TRUE yields strange results |
Previous Message | Garrett Dangerfield | 2004-02-12 22:04:05 | copy problem |