From: | "Dan Wilson" <phpPgAdmin(at)acucore(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Weird View behavior |
Date: | 2001-01-26 20:46:08 |
Message-ID: | 001f01c087d9$02f02740$543987cf@corp.peoplesoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I've got some wierd behavior with a view that I created.
devwindaily=# select version();
version
---------------------------------------------------------------------
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
(1 row)
devwindaily=# \d email_num
View "email_num"
Attribute | Type | Modifier
-------------------+-------------+----------
user_emailaddress | varchar(50) |
email_count | integer |
View definition: SELECT user_info.user_emailaddress, count(user_info.user_emailaddress) AS email_count FROM user_info GROUP BY user_info.user_emailaddress;
devwindaily=# select * from email_num;
user_emailaddress | email_count
-------------------------+-------------
aaaa | 1
adfd(at)dkdk(dot)com | 1
asfdasdfadsfafdsaf | 1
brady(at)windaily(dot)com | 1
marcellus(at)chooseibs(dot)com | 3
mbarrus(at)chooseibs(dot)com | 1
mbarrus(at)swift-net(dot)com | 1
vvv(at)sss(dot)com | 1
xxxx | 1
(9 rows)
devwindaily=# select * from email_num where email_count > 1;
user_emailaddress | email_count
-------------------------+-------------
aaaa | 1
adfd(at)dkdk(dot)com | 1
asfdasdfadsfafdsaf | 1
brady(at)windaily(dot)com | 1
marcellus(at)chooseibs(dot)com | 3
mbarrus(at)chooseibs(dot)com | 1
mbarrus(at)swift-net(dot)com | 1
vvv(at)sss(dot)com | 1
xxxx | 1
(9 rows)
devwindaily=# select * from email_num where email_count < 2;
user_emailaddress | email_count
-------------------+-------------
(0 rows)
devwindaily=# select * from email_num where email_count < 1;
user_emailaddress | email_count
-------------------+-------------
(0 rows)
devwindaily=# select * from email_num where email_count = 1;
user_emailaddress | email_count
-------------------+-------------
(0 rows)
Now what is going on?!?!? That just plain old doesn't make sense!
Thanks for any help!
-Dan
From | Date | Subject | |
---|---|---|---|
Next Message | Will Fitzgerald | 2001-01-26 20:58:28 | ISA function? |
Previous Message | Gregory Wood | 2001-01-26 20:14:09 | Re: Update Trigger Inconsistency with 7.1? |