Re: Bug #432: Macaddr accepts empty string
pgsql-bugs@postgresql.org writes:
The datatype macaddr accepts empty strings as data. I think this is
not correct; an empty string is no valid mac address.
This is already changed for 7.2.
regression=# select ''::macaddr;
ERROR: macaddr_in: error in parsing ""
regression=#
regards, tom lane
Import Notes
Reply to msg id not found: 200108281540.f7SFegl13578@hub.orgReference msg id not found: 200108281540.f7SFegl13578@hub.org
Not any more:
test=> create table pp (x macaddr);
CREATE
test=> insert into pp values ('');
ERROR: macaddr_in: error in parsing ""
Daniel Mantione (daniel@deadlock.et.tudelft.nl) reports a bug with a severity of 3
The lower the number the more severe it is.Short Description
Macaddr accepts empty stringLong Description
Hello,The datatype macaddr accepts empty strings as data. I think this is not correct; an empty string is no valid mac address.
It should accept NULL (which it does).
Greetings,
Daniel Mantione
Sample Code
No file was uploaded with this report
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Import Notes
Reply to msg id not found: 200108281540.f7SFegl13578@hub.org | Resolved by subject fallback