Thread: VARCHAR to CIDR type cast : external function for 6.5

VARCHAR to CIDR type cast : external function for 6.5

From
Nicolas Huillard
Date:
With the patch from Alex Pilosov (7.1), I was able to create external functions (6.5) to cast TEXT type to CIDR.
These function allow things like :
    SELECT text_inet(text_field);
    SELECT ... FROM ... WHERE text_cidr(text_field) >> '192.168.200.1'::inet;
...which are impossible with the current Postgres.
The code has greatly changed from 6.5 to 7.1, so these function might help users of older versions...
Extract the tarball, compile and install (tested on Linux/Postgres 6.5.3).



NH

Attachment