Darren Duncan wrote:
> Consider the context however.  We're talking about a UNIQUE constraint and so
> what we want to do is prevent the existence of multiple tuples in a relation
> that are the same for some defined subset of their attributes.  I would argue
> that logically, and commonsensically, two tuples with no attributes are the
> same, and hence a set of distinct tuples having zero attributes could have no
> more than one member, and so a UNIQUE constraint over zero attributes would 
> say
> the relation can't have more than one tuple.  So unless someone wants to argue
> that two tuples with no attributes are not the same, my interpretation makes
> more sense and is clearly the one to follow. -- Darren Duncan

What you propose is not an interpretation, but an extension
of the standard.  I'm not certain about that "clearly" either;
intuition is a questionable guideline when it comes to the
standard:

SELECT 'Things that feel equal are '
       || CASE WHEN NULL = NULL THEN '' ELSE 'not always ' END
       || 'equal';
                  ?column?
---------------------------------------------
 Things that feel equal are not always equal
(1 row)

Yours,
Laurenz Albe

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to