From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
PostgreSQL type extensions for IP and MAC addresses. I needed to record IP and MAC level ethernet addresses in a data base, and I really didn't want to store them as plain strings, with no enforced error checking, so I put together the accompanying code as my first experiment with adding a data type to PostgreSQL. I then thought that this might be useful to others, both directly and as a very simple example of how to do this sort of thing, so here it is, in the hope that it will be useful.
Showing
- contrib/ip_and_mac/Makefile 20 additions, 0 deletionscontrib/ip_and_mac/Makefile
- contrib/ip_and_mac/README 51 additions, 0 deletionscontrib/ip_and_mac/README
- contrib/ip_and_mac/ip.c 212 additions, 0 deletionscontrib/ip_and_mac/ip.c
- contrib/ip_and_mac/ip.sql 131 additions, 0 deletionscontrib/ip_and_mac/ip.sql
- contrib/ip_and_mac/mac.c 202 additions, 0 deletionscontrib/ip_and_mac/mac.c
- contrib/ip_and_mac/mac.h 130 additions, 0 deletionscontrib/ip_and_mac/mac.h
- contrib/ip_and_mac/mac.sql 88 additions, 0 deletionscontrib/ip_and_mac/mac.sql
Loading
Please register or sign in to comment