MACADDR types NULL value (undocumented?) - Mailing list pgsql-general

From Mayers, Philip J
Subject MACADDR types NULL value (undocumented?)
Date
Msg-id A0F836836670D41183A800508BAF190B35E453@icex1.cc.ic.ac.uk
Whole thread Raw
Responses Re: MACADDR types NULL value (undocumented?)  (Michael Fork <mfork@toledolink.com>)
List 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                 |
+----------------------------------+

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: error messages VERY misleading...!
Next
From: Michael Fork
Date:
Subject: Re: MACADDR types NULL value (undocumented?)