On Tue, Mar 31, 2009 at 6:44 PM, justin <justin@xxxxxxxxxxxxxxx> wrote: > > Consider this. I have intelligent part numbers that need to be split apart > to simplify searching and do math with. > > string_to_array(' F-2500-50 ', '-' ) ::int[] Yeah, that's what I've said about three times. If you're building a parser and think of it in terms of string parsing then yes, a singletone array makes sense. > Still fails with an error as expected. what is the difference between ' ' > and 'F' I don't know what you're talking about. The question is how many elements are in ''. No space. And no separators. To repeat for the last time. If you think in terms of string processing then the answer 1 is reasonable. But if you think it's a list of separate items then anyone will say that's an empty list and contains no elements. Nobody has ever suggested filtering out empty elements or dealing specially with spaces or anything else like that. If you're talking about that then you've missed the original question. One last try. If there's a column called "shopping list" which is a comma-separated list of items to buy in the store and I store '' in it. How many items do you think that means you should go shopping for? Do you think that's one item that should be rejected because it's an empty string? Or do you think that's an empty list with zero items listed? What would it look like if it was a zero-length list? You can ask what would it look like if it was a shopping list of one item called ''. But I agree both are theoretically consistent, but one is actually useful in 99% of use cases. The other is only useful in unusual cases. -- greg -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general