agdsn / hades

AG DSN Authentication and Authorization Infrastructure
MIT License
8 stars 3 forks source link

Handle string MAC and IP addresses with invalid format gracefully #9

Closed sebschrader closed 8 years ago

sebschrader commented 8 years ago

The foreign database tables may store the MAC addresses and IP addresses as strings rather than PostgreSQL's native macaddr and inet types. This will definitely happen, if the foreign database is MySQL where there are no native types for IPs and MAC addresses.

When the materialized views are refreshed from such tables and there is at least one invalid string value that can not be cast to the native type, the refresh will fail.

If this is the first refresh the view will be left in an unscanable state, if this is a subsequent refresh the view will not be updated.