MACADDR types NULL value (undocumented?)

From: "Mayers, Philip J" <p(dot)mayers(at)ic(dot)ac(dot)uk>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: MACADDR types NULL value (undocumented?)
Date: 2001-03-21 14:48:09
Message-ID: A0F836836670D41183A800508BAF190B35E453@icex1.cc.ic.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hdb=> explain select * from host where mac = '00:00:00:00:00:00';

Seq Scan on host (cost=0.00..460.62 rows=1793 width=62)

hdb=> explain select * from host where mac = '00:00:00:00:00:01';

Index Scan using host_mac on host (cost=0.00..145.07 rows=179 width=62)

I take it that:

1) 00:00:00:00:00:00 is interpreted as NULL for MACADDR types (grr...)
2) NULL tests aren't optimised by indices (I know this already)

This should be added to the documentation. I'm going to have to use a
different value for my NULL, since I will need to be indexing those...

Regards,
Phil

+----------------------------------+
| Phil Mayers, Network Support |
| Centre for Computing Services |
| Imperial College |
+----------------------------------+

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fork 2001-03-21 15:04:31 Re: MACADDR types NULL value (undocumented?)
Previous Message Stephan Szabo 2001-03-21 14:46:44 Re: error messages VERY misleading...!