Re:Add pg_get_publication_ddl function - Mailing list pgsql-hackers

From zengman
Subject Re:Add pg_get_publication_ddl function
Date
Msg-id tencent_4D7CAAFE3DC969CD0F75BD90@qq.com
Whole thread Raw
In response to Add pg_get_publication_ddl function  ("Jonathan Gonzalez V." <jonathan.abdiel@gmail.com>)
List pgsql-hackers
Hi,

I haven't tested your patch yet, but I noticed a few points that may need adjustment:

Based on your code logic, the pub parameter passed here can never be NULL — if the corresponding PUBLICATION does not
exist,an error should have already been thrown earlier in the code flow. 
 
Therefore, the following code block can be removed, and the usage of return (Datum) NULL; in this block is also
incorrect:
```
    if (pub == NULL)
        return (Datum) NULL;
```
pubtuple is not being freed — please use heap_freetuple to release it.

The format string "%sALL SEQUENCE" should be corrected to "%sALL SEQUENCES".

--
Regards,
Man Zeng
www.openhalo.org

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: JumbleQuery ma treat different GROUP BY expr as the same
Next
From: Xuneng Zhou
Date:
Subject: Re: Add WALRCV_CONNECTING state to walreceiver