Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix comment in GetPublicationRelations

  1. Improve comment in function GetPublicationRelations

    Shlok Kyal <shlok.kyal.oss@gmail.com> — 2025-12-10T11:15:53Z

    Hi,
    
    While working on the thread [1], we found that the comment in the
    function GetPublicationRelations is not correct. This function gets
    the list of relations associated with the publication, but the comment
    says the opposite :
    /* Find all publications associated with the relation. */
    
    Attached a patch to fix it.
    
    [1]: https://www.postgresql.org/message-id/CANhcyEV_EVi5cgJ6WPvmeVAqjCS7Of%2BVAWuRHZtsVf8PQb_z7g%40mail.gmail.com
    
    Thanks,
    Shlok Kyal
    
  2. Re: Improve comment in function GetPublicationRelations

    Chao Li <li.evan.chao@gmail.com> — 2025-12-10T13:30:02Z

    
    > On Dec 10, 2025, at 19:15, Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
    > 
    > Hi,
    > 
    > While working on the thread [1], we found that the comment in the
    > function GetPublicationRelations is not correct. This function gets
    > the list of relations associated with the publication, but the comment
    > says the opposite :
    > /* Find all publications associated with the relation. */
    > 
    > Attached a patch to fix it.
    > 
    > [1]: https://www.postgresql.org/message-id/CANhcyEV_EVi5cgJ6WPvmeVAqjCS7Of%2BVAWuRHZtsVf8PQb_z7g%40mail.gmail.com
    > 
    > Thanks,
    > Shlok Kyal
    > <v1-0001-Improve-comment-in-function-GetPublicationRelatio.patch>
    
    Looking at the code:
    
    ```
     /* Find all publications associated with the relation. */
    pubrelsrel = table_open(PublicationRelRelationId, AccessShareLock);
    
    ScanKeyInit(&scankey,
    Anum_pg_publication_rel_prpubid,
    BTEqualStrategyNumber, F_OIDEQ,
    ObjectIdGetDatum(pubid));
    ```
    
    It queries the pg_publication table by a pubid, so, indeed, the fix is correct.
    
    Best regards,
    --
    Chao Li (Evan)
    HighGo Software Co., Ltd.
    https://www.highgo.com/
    
    
    
    
    
    
    
    
  3. Re: Improve comment in function GetPublicationRelations

    Heikki Linnakangas <hlinnaka@iki.fi> — 2025-12-10T13:35:18Z

    On 10/12/2025 13:15, Shlok Kyal wrote:
    > Hi,
    > 
    > While working on the thread [1], we found that the comment in the
    > function GetPublicationRelations is not correct. This function gets
    > the list of relations associated with the publication, but the comment
    > says the opposite :
    > /* Find all publications associated with the relation. */
    > 
    > Attached a patch to fix it.
    > 
    > [1]: https://www.postgresql.org/message-id/CANhcyEV_EVi5cgJ6WPvmeVAqjCS7Of%2BVAWuRHZtsVf8PQb_z7g%40mail.gmail.com
    
    Fixed, thanks
    
    - Heikki