Re: Disallow arrays with non-standard lower bounds
| От | Jim Nasby |
|---|---|
| Тема | Re: Disallow arrays with non-standard lower bounds |
| Дата | |
| Msg-id | 52D08B05.9030903@nasby.net обсуждение исходный текст |
| Ответ на | Re: Disallow arrays with non-standard lower bounds (Merlin Moncure <mmoncure@gmail.com>) |
| Список | pgsql-hackers |
On 1/10/14, 4:14 PM, Merlin Moncure wrote: > On Fri, Jan 10, 2014 at 4:10 PM, Jeff Janes <jeff.janes@gmail.com> wrote: >> On Fri, Jan 10, 2014 at 1:26 PM, Jim Nasby <jim@nasby.net> wrote: >>> >>> On 1/9/14, 10:58 PM, Tom Lane wrote: >>>> >>>> Jim Nasby <jim@nasby.net> writes: >>>>> >>>>> ISTM that allowing users to pick arbitrary lower array bounds was a huge >>>>> mistake. I've never seen anyone make use of it, can't think of any >>>>> legitimate use cases for it, and hate the stupendous amount of extra code >>>>> needed to deal with it. >>>> >>>> >>>> You lack imagination, sir. >>> >>> >>> Considering what you'd normally want to do in SQL, the only example I can >>> think of is to not have the argument over 0 vs 1 based. >>> >>> Actually, I was thinking there might be some computational problems where >>> changing lower bound would be nice, but then again, what other languages >>> actually support this? >> >> Perl does, though they regret it bitterly. > > What does it matter? Our arrays have had the capability for years and > years and "because it's cleaner" is simply not justification to break > people's applications. Why are we even considering this? Because it's a foot-gun. So far no one has given a legitimate use case for it and supporting it *greatly* complicates iteratingover arrays. Also, just to be clear, I'd be fine with offering a better alternative and leaving existing arrays alone. I don't see anyeasy way to do that, but maybe someone's got a good idea on that. -- Jim C. Nasby, Data Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net
В списке pgsql-hackers по дате отправления: