Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

RE: not storing address in a single field, splitting an address into semantic fields feels like a premature optimisation. You’re forced to anticipate all the fields that you may want to aggregate by, before you may actually even use them.

Instead, you could just create a custom function that takes in a string and tries to identify the city or street number or whatever element you want extract from the address e.g.

    select * from users where extract_city(address) = 'london';


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: