mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Allow input format xxxx-xxxx-xxxx for macaddr type
Author: Herwin Weststrate <herwin@quarantainenet.nl> Reviewed-by: Ali Akbar <the.apaan@gmail.com>
This commit is contained in:
@@ -56,6 +56,9 @@ macaddr_in(PG_FUNCTION_ARGS)
|
||||
if (count != 6)
|
||||
count = sscanf(str, "%2x%2x.%2x%2x.%2x%2x%1s",
|
||||
&a, &b, &c, &d, &e, &f, junk);
|
||||
if (count != 6)
|
||||
count = sscanf(str, "%2x%2x-%2x%2x-%2x%2x%1s",
|
||||
&a, &b, &c, &d, &e, &f, junk);
|
||||
if (count != 6)
|
||||
count = sscanf(str, "%2x%2x%2x%2x%2x%2x%1s",
|
||||
&a, &b, &c, &d, &e, &f, junk);
|
||||
|
||||
Reference in New Issue
Block a user