Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
От | Bruce Momjian |
---|---|
Тема | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) |
Дата | |
Msg-id | 20130620195811.GA20417@momjian.us обсуждение исходный текст |
Ответ на | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re:
Should array_length() Return NULL)
|
Список | pgsql-hackers |
On Thu, Jun 13, 2013 at 11:57:27AM -0500, Merlin Moncure wrote: > >> But, couldn't that be solved by deprecating that function and > >> providing a more sensible alternatively named version? > > > > And what would you name that function? array_dims2? I can't think of > > a name that makes the difference in behaviour apparent. Can you > > imagine the documentation for that? > > I don't know the answer to that, but I think it's hard to argue that > deprecating and documenting a few functions is a heavier burden on > your users than having to sift through older arcane code before > upgrading to the latest version of the database. We're not the only > ones stuck with lousy old functions (C finally ditched gets() in the > 2011 standard). I also happen to think the current array_api function > names are not particularly great (especially array_upper/array_lower) > so I won't shed too many tears. Sorry to be late on this, but are you saying people have code that is testing: select array_dims('{}'::int[]) for a NULL return, and they would need to change that to test for zero? -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: