Skip site navigation (1) Skip section navigation (2)

Row IS NULL question

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Row IS NULL question
Date: 2006-09-28 14:24:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 

(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
(1 row)

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

Teodor Sigaev                                   E-mail: teodor(at)sigaev(dot)ru


pgsql-hackers by date

Next:From: Marlon PetryDate: 2006-09-28 14:26:54
Subject: Backup and restore through JDBC
Previous:From: Andrew DunstanDate: 2006-09-28 14:16:31
Subject: Re: [Pgbuildfarm-members] [HACKERS] Buildfarm alarms

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group