3 ms·
From the datatype wish list, these look like a bad idea actually: - url - If all schemes are allowed, this is almost equivalent to "does it include :// after t
by viraptor 14y ago
From the datatype wish list, these look like a bad idea actually:
- url - If all schemes are allowed, this is almost equivalent to "does it include :// after the first word". I'm not sure why it should be included.
- phone - Around the world this is equivalent to: does it contain digits. And maybe also + # and star. And maybe also letters for internal voip phones. And....
- zip - Every country has its own. There is no common format. It can have letters, numbers, symbols, ... anything.
- email - This actually could work if it allowed all possible formats.
- jeffdavis 14y agoI can see most of those being useful so that you can easily extract components. For instance, from a URL you might want to extract the URI; or from a phone number you might want to extract the country code. If done right, I can see those being useful. I agree that it can be overdone, though.
- jacques_chester 14y agoPostgreSQL handles UUIDs, IP addresses and booleans quite intelligently. Where appropriate they include specialised functions that you can use in queries, and the formats for input are generous so long as your input is unambiguous. For example, the boolean type in PostgreSQL will accept TRUE, 'true', 't', '1', 'on', 'y' and 'yes' (case insensitive) for truthful values and the equivalents for false values. It's hard to state how much better this is than Oracle, to take my work environment as an example. My point is that I imagine that when the PostgreSQL team get around to these types, they will address them with the same care and forethought as they have for everything else. I trust them because their feature plans are not based on maximising shininess.
- wereHamster 14y ago> For example, the boolean type in PostgreSQL will accept TRUE, 'true', 't', '1', 'on', 'y' and 'yes' (case insensitive) for truthful values and the equivalents for false values. But does it support 'affirmative', 'correct', 'aye' (http://thedailywtf.com/Articles/Are-You-Sure.aspx http://thedailywtf.com/Articles/Are-You-Sure.aspx) or 'YOUBET', 'YEP', 'NOWay', 'YEAH', 'NOPE', 'Maybe' (http://thedailywtf.com/Articles/The-Object-Test,-a-New-PI,-and-More-SHEEIT.aspx http://thedailywtf.com/Articles/The-Object-Test,-a-New-PI,-a...) ? Note the mapping of 'Maybe' to a boolean through '__TIME__[7]&1'!