Row IS NULL question - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Row IS NULL question
Date
Msg-id 451BDB28.4050201@sigaev.ru
Whole thread Raw
Responses Re: Row IS NULL question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I'm playing around NULL. Docs says that
"A row value is considered not null if it has at least one field that is not 
null." and "SELECT ROW(table.*) IS NULL FROM table;  -- detect all-null rows"

So, I try:

wow=# \d tst          Table "public.tst" Column |       Type       | Modifiers
--------+------------------+----------- a      | double precision | b      | double precision |


% echo 'SELECT count(*) FROM tst WHERE a IS NULL AND b IS NULL;' | psql wow 

SET count
-------     6
(1 row)

But ROW() IS NULL doesn't find anything:
% echo 'SELECT ROW(tst.*) IS NULL FROM tst;' | psql wow  | grep 't'
% echo 'SELECT count(*) FROM tst WHERE ROW(tst.*) IS NULL;' | psql wow
SET count
-------     0
(1 row)

What do I do wrong? Version of postgres - today's HEAD.


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


pgsql-hackers by date:

Previous
From: Mike Bassett
Date:
Subject: Install on Windows XP
Next
From: "Marlon Petry"
Date:
Subject: Backup and restore through JDBC