pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: P G <pg_dba@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How does PostgreSQL treat null values in unique composite
Date: Tue, 8 Apr 2003 13:41:19 -0700 (PDT)
Message-ID: <20030408133754.J54456-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20030408194858.77038.qmail@web13306.mail.yahoo.com>


On Tue, 8 Apr 2003, P G wrote:

> > Where can I find the documentation cited for the
> > "unique predicate" mentioned below?
That's the SQL92 draft, although I believe the SQL99 text is effectively
the same.  The sections are 11.7 (for the definition of the constraint
in terms of the predicate) and 8.9 for the predicate itself (General Rule
2 specifically)

> Also, the "unique predicate" only explains what it
> means to be unique, but it says nothing about how null
> values are treated.  Will someone explain what the
> value of null is?

It isn't a precise value.  It's a holder for unknown.  It's unknown
whether it's equal or not equal to any other value (including another
NULL), so 1 = NULL returns unknown, NULL=NULL returns unknown, 1!=NULL
returns unknown.




view thread (7+ messages)  latest in thread

Message-ID: <20030408133754.J54456-100000@megazone23.bigpanda.com>
Permalink:  ../20030408133754.J54456-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030408133754.J54456-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, pg_dba@yahoo.com
  Subject: Re: How does PostgreSQL treat null values in unique composite
  In-Reply-To: <20030408133754.J54456-100000@megazone23.bigpanda.com>
  References: <20030408194858.77038.qmail@web13306.mail.yahoo.com> <20030408133754.J54456-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox