Re: Consolidate 'unique array values' logic into a reusable function?
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Consolidate 'unique array values' logic into a reusable function? |
| Дата | |
| Msg-id | 22244.1470585142@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Consolidate 'unique array values' logic into a reusable function? (Thomas Munro <thomas.munro@enterprisedb.com>) |
| Ответы |
Re: Consolidate 'unique array values' logic into a reusable function?
|
| Список | pgsql-hackers |
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> Here's a sketch patch that creates a function array_unique which takes
> the same arguments as qsort or qsort_arg and returns the new length.
Hmm ... I'd be against using this in backend/regex/, because I still
have hopes of converting that to a standalone library someday (and
in any case it needs to stay compatible with Tcl's copy of the code).
But otherwise this seems like a reasonable proposal.
As for the function name, maybe "qunique()" to go with "qsort()"?
I'm not thrilled with "array_unique" because that sounds like it
is meant for Postgres' array data types.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера