Re: Some comments on PL/Python documentation

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Some comments on PL/Python documentation
Дата
Msg-id 52d8cc94-3a74-4f4a-9502-f42137398435@eisentraut.org
обсуждение исходный текст
Ответ на Re: Some comments on PL/Python documentation  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-docs
On 08.01.25 09:45, Peter Eisentraut wrote:
>> 44.2.5. Set-Returning Functions
>> 1. You say: '...Sequence type (tuple, list, set)...'
>> Being an unordered collection, sets do not record element position or 
>> order
>> of insertion. Accordingly, sets do not support indexing, slicing, or 
>> other
>> sequence-like behavior.
>> See
>> https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset
> 
> I think this is correct as it is.  Python sets can be iterated over, so 
> this works.  Note that earlier in the page under composite types it says 
> "but not a set because it is not indexable", so this distinction was 
> taken into consideration.

I have added a test for returning Python sets from SETOF functions.  It 
makes sense to test this if the documentation claims it.




В списке pgsql-docs по дате отправления: