agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedltree docs imprecise about sorting order
3+ messages / 3 participants
[nested] [flat]
* ltree docs imprecise about sorting order
@ 2024-05-23 16:17 PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Doc comments form @ 2024-05-23 16:17 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: pierre@vennin.net
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/16/ltree.html
Description:
The ltree docs available at
https://www.postgresql.org/docs/current/ltree.html state "Comparison sorts
in the order of a tree traversal" without specifying the strategy
implemented to walk the tree.
A quick experiment suggests that the implemented solution is pre-ordered
depth-first search.
I suggest the ltree docs be amended to "Comparison sorts in the order of a
pre-ordered depth-first tree traversal".
Best regards,
Pierre Vennin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ltree docs imprecise about sorting order
@ 2024-10-17 01:02 Bruce Momjian <bruce@momjian.us>
parent: PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Momjian @ 2024-10-17 01:02 UTC (permalink / raw)
To: pierre@vennin.net, PostgreSQL-development <pgsql-hackers@postgresql.org>
On Thu, May 23, 2024 at 04:17:50PM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/16/ltree.html
> Description:
>
> The ltree docs available at
> https://www.postgresql.org/docs/current/ltree.html state "Comparison sorts
> in the order of a tree traversal" without specifying the strategy
> implemented to walk the tree.
> A quick experiment suggests that the implemented solution is pre-ordered
> depth-first search.
> I suggest the ltree docs be amended to "Comparison sorts in the order of a
> pre-ordered depth-first tree traversal".
[ moved to hackers ]
Can someone confirm this and/or create a patch?
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
When a patient asks the doctor, "Am I going to die?", he means
"Am I going to die soon?"
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ltree docs imprecise about sorting order
@ 2024-10-17 01:26 David G. Johnston <david.g.johnston@gmail.com>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 3+ messages in thread
From: David G. Johnston @ 2024-10-17 01:26 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: pierre@vennin.net <pierre@vennin.net>; PostgreSQL-development <pgsql-hackers@postgresql.org>
On Wednesday, October 16, 2024, Bruce Momjian <bruce@momjian.us> wrote:
> On Thu, May 23, 2024 at 04:17:50PM +0000, PG Doc comments form wrote:
> > The following documentation comment has been logged on the website:
> >
> > Page: https://www.postgresql.org/docs/16/ltree.html
> > Description:
> >
> > The ltree docs available at
> > https://www.postgresql.org/docs/current/ltree.html state "Comparison
> sorts
> > in the order of a tree traversal" without specifying the strategy
> > implemented to walk the tree.
> > A quick experiment suggests that the implemented solution is pre-ordered
> > depth-first search.
> > I suggest the ltree docs be amended to "Comparison sorts in the order of
> a
> > pre-ordered depth-first tree traversal".
>
> [ moved to hackers ]
>
> Can someone confirm this and/or create a patch?
>
If we are going to update the description of sorting we should probably
take the chance to mention collation, or I believe the lack thereof.
Including an example with order by wouldn’t hurt either.
The example data is also a perfect tree, all intermediate nodes exist as
their own rows. It may be informative to include exceptions to this rule.
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-10-17 01:26 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-23 16:17 ltree docs imprecise about sorting order PG Doc comments form <noreply@postgresql.org>
2024-10-17 01:02 ` Bruce Momjian <bruce@momjian.us>
2024-10-17 01:26 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox