Re: [SQL] it's not NULL, then what is it?

2009-07-01 Thread Rob Sargent
...@gallo.ucsf.edu -Original Message- From: Osvaldo Kussama [mailto:osvaldo.kuss...@gmail.com] Sent: Tue 6/30/2009 6:49 PM To: Tena Sakai Subject: Re: [SQL] it's not NULL, then what is it? 2009/6/30 Tena Sakai tsa...@gallo.ucsf.edu: Hi Everybody, I have a table called gallo.sds_seq_reg_shw, which

Re: [SQL] it's not NULL, then what is it?

2009-07-01 Thread Tena Sakai
(10 rows) canon=# Regards, Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Rob Sargent [mailto:robjsarg...@gmail.com] Sent: Wed 7/1/2009 9:36 AM To: Tena Sakai Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] it's not NULL, then what is it? So they were null, and null turns

Re: [SQL] it's not NULL, then what is it?

2009-07-01 Thread Tom Lane
Tena Sakai tsa...@gallo.ucsf.edu writes: So they were null, Yes! and null turns out to be a seven-character blank string!? I don't understand how that happens. Mr Tom Lane hinted that it might be a bug in sprintf... Well, that was before I read the messages where it turned out that they

Re: [SQL] it's not NULL, then what is it?

2009-07-01 Thread Tena Sakai
@postgresql.org Subject: Re: [SQL] it's not NULL, then what is it? Tena Sakai tsa...@gallo.ucsf.edu writes: So they were null, Yes! and null turns out to be a seven-character blank string!? I don't understand how that happens. Mr Tom Lane hinted that it might be a bug in sprintf... Well

[SQL] it's not NULL, then what is it?

2009-06-30 Thread Tena Sakai
Hi Everybody, I have a table called gallo.sds_seq_reg_shw, which is like: canon=# \d gallo.sds_seq_reg_shw Table gallo.sds_seq_reg_shw Column | Type | Modifiers --+-+--- name | text| response | text|

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Rob Sargent
Tena Sakai wrote: Hi Everybody, I have a table called gallo.sds_seq_reg_shw, which is like: canon=# \d gallo.sds_seq_reg_shw Table gallo.sds_seq_reg_shw Column | Type | Modifiers --+-+--- name | text| response

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Edward W. Rouse
Just out of curiosity did you try maf = 0? Edward W. Rouse From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Tena Sakai Sent: Tuesday, June 30, 2009 6:03 PM To: pgsql-sql@postgresql.org Subject: [SQL] it's not NULL, then what is it? Hi Everybody

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Steve Crawford
... canon=# select count(maf) from gallo.sds_seq_reg_shw canon-# where maf ISNULL; count --- 0 (1 row) I believe count will only count not-null anyway so this will always return zero. Try count(*) instead of count(maf). Here's an example: st...@[local]= select * from

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Thomas Kellerer
Steve Crawford wrote on 01.07.2009 00:39: canon=# select count(maf) from gallo.sds_seq_reg_shw canon-# where maf ISNULL; I believe count will only count not-null Correct SELECT count(some_col) FROM some_table; is the same as SELECT count(*) FROM some_table WHERE some_col IS NOT NULL;

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Tena Sakai
Sakai Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] it's not NULL, then what is it? Tena Sakai wrote: Hi Everybody, I have a table called gallo.sds_seq_reg_shw, which is like: canon=# \d gallo.sds_seq_reg_shw Table gallo.sds_seq_reg_shw Column | Type

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Tena Sakai
...@postgresql.org on behalf of Edward W. Rouse Sent: Tue 6/30/2009 3:22 PM To: pgsql-sql@postgresql.org Subject: Re: [SQL] it's not NULL, then what is it? Just out of curiosity did you try maf = 0? Edward W. Rouse From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Tena Sakai
Sakai tsa...@gallo.ucsf.edu -Original Message- From: Steve Crawford [mailto:scrawf...@pinpointresearch.com] Sent: Tue 6/30/2009 3:39 PM To: Tena Sakai Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] it's not NULL, then what is it? ... canon=# select count(maf) from

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Tena Sakai
q 4645647 $ Many thanks, Osvald. Regards, Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Osvaldo Kussama [mailto:osvaldo.kuss...@gmail.com] Sent: Tue 6/30/2009 6:49 PM To: Tena Sakai Subject: Re: [SQL] it's not NULL, then what is it? 2009/6/30 Tena Sakai tsa

Re: [SQL] it's not NULL, then what is it?

2009-06-30 Thread Tena Sakai
, Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Tue 6/30/2009 7:17 PM To: Tena Sakai Cc: Edward W. Rouse; pgsql-sql@postgresql.org Subject: Re: [SQL] it's not NULL, then what is it? Tena Sakai tsa...@gallo.ucsf.edu writes: My