Re: Some comments on PL/Python documentation - Mailing list pgsql-docs

From Peter Eisentraut
Subject Re: Some comments on PL/Python documentation
Date
Msg-id 52d8cc94-3a74-4f4a-9502-f42137398435@eisentraut.org
Whole thread Raw
In response to Re: Some comments on PL/Python documentation  (Peter Eisentraut <peter@eisentraut.org>)
List 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 by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Mention the default io_method?
Next
From: "Daniel Westermann (DWE)"
Date:
Subject: Re: Mention the default io_method?