Cleaning up array_ref() and array_set()
| От | David Geier |
|---|---|
| Тема | Cleaning up array_ref() and array_set() |
| Дата | |
| Msg-id | 5bb669cc-7c48-4a50-b0b6-0612f95426d1@gmail.com обсуждение исходный текст |
| Ответы |
Re: Cleaning up array_ref() and array_set()
|
| Список | pgsql-hackers |
Hi hackers,
We have array_ref() and array_set() which are merely wrappers around
array_get_element() and array_set_element(). The wrappers take an
ArrayType * argument while array_{get|set}_element() take a Datum as
argument; like most of the other array functions.
array_ref() and array_set() are relicts from the following commit from 2015:
commit e983c4d1aa42d613542cf222e222b034918374b1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon Feb 16 12:23:58 2015 -0500
...
However, there's a fair amount of code using array_ref and array_set
with arrays that *are* known to be ArrayType structures, and there might
be more such places in third-party code.
This has changed over the years. On master there are only 5 calls to
array_ref() and 5 calls to array_set() left. Are there any objections
against cleaning up the code by removing array_ref() and array_set()?
--
David Geier
В списке pgsql-hackers по дате отправления: