From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | gri(dot)bogdan(dot)2020(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Some comments on PL/Python documentation |
Date: | 2025-04-03 09:11:07 |
Message-ID: | 52d8cc94-3a74-4f4a-9502-f42137398435@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Westermann (DWE) | 2025-04-03 11:26:18 | Re: Mention the default io_method? |
Previous Message | Pavel Stehule | 2025-04-02 10:32:23 | Re: Mention the default io_method? |