Assignment 1 Review (cont)
Storing in canonical form (e.g. all lower-case), and pre-split
- simplifies query-time operations like
email_cmp()
Having a generic email_cmp() function
- simplifies rest of code, especially operator functions
Accesing data in var-length pre-split struct:
struct Email *ep;
ep = (struct Email *)PG_GETARG_POINTER(0);
char *local = &(ep->addr[0]);
char *domain = &(ep->addr[ep->dom0]);
|
|