Thread

  1. ORDER BY logic in PostgreSQL source code

    Sajti Zsolt Zoltán <qnwbq9@inf.elte.hu> — 2021-11-10T06:43:43Z

    I'm currently working on a GiST extension for PostgreSQL and I ran into strange ORDER BY results during my queries.
    
    Because I can't find the problem in my source code, I want to investigate the issue by looking at the PostgreSQL source,
    maybe inserting extra log messages.
    While trying to do this, I came to the conclusion that I need developer help, because I can't find the part of the source code
    where the ORDER BY logic is implemented.
    
    Could you please help, by telling me which files should I take a look at?
    
    Thanks in advance!
    
  2. Re: ORDER BY logic in PostgreSQL source code

    Rafia Sabih <rafia.pghackers@gmail.com> — 2021-11-10T11:47:46Z

    On Wed, 10 Nov 2021 at 11:57, Sajti Zsolt Zoltán <qnwbq9@inf.elte.hu> wrote:
    >
    > I'm currently working on a GiST extension for PostgreSQL and I ran into strange ORDER BY results during my queries.
    >
    > Because I can't find the problem in my source code, I want to investigate the issue by looking at the PostgreSQL source,
    > maybe inserting extra log messages.
    > While trying to do this, I came to the conclusion that I need developer help, because I can't find the part of the source code
    > where the ORDER BY logic is implemented.
    >
    > Could you please help, by telling me which files should I take a look at?
    >
    > Thanks in advance!
    
    I think you can start by looking into the function grouping_planner
    and explore further by going through the route of it.
    
    -- 
    Regards,
    Rafia Sabih