Using NULL values in calculated results

From: Zak McGregor <zak(at)mighty(dot)co(dot)za>
To: pgsql-general(at)postgresql(dot)org
Subject: Using NULL values in calculated results
Date: 2001-02-23 11:34:06
Message-ID: 200102231134.NAA00999@zak.home.dom
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all

Am I wrong in thinking that any mathematical operation with a null value
should result in a null result? The reason I ask is that the following all
behave as expected:
select 1+null => null
select 1*null => null

but select 1/null => division by zero error. Is this how it is supposed to
work? I've tried on 7.0.2 and 7.0.3.

Thanks

Cheers

Zak

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pete Forman 2001-02-23 11:49:40 Re: Questions to lists / translations
Previous Message Karel Zak 2001-02-23 10:05:57 Re: International support