Re: CREATE TABLE .. LIKE copies comments to an unrelated table - Mailing list pgsql-hackers

From Jim Jones
Subject Re: CREATE TABLE .. LIKE copies comments to an unrelated table
Date
Msg-id 3e9503eb-76e0-428d-81ac-19a1e6494e90@uni-muenster.de
Whole thread
In response to Re: CREATE TABLE .. LIKE copies comments to an unrelated table  (Junwang Zhao <zhjwpku@gmail.com>)
Responses Re: CREATE TABLE .. LIKE copies comments to an unrelated table
List pgsql-hackers
Hi Junwang

On 01/10/2026 17:31, Junwang Zhao wrote:
> The preceding RangeVarGetAndCheckCreationNamespace has already
> initialized the temporary namespace and returned its OID, so simplified it
> to:
> 
> if (stmt->relation->schemaname == NULL)
>     stmt->relation->schemaname = get_namespace_name(namespaceid);
> 
> should work, I did a quick test to verify this.

+1

Thanks! I will write some tests and prepare a patch.

Best, Jim




pgsql-hackers by date:

Previous
From: Junwang Zhao
Date:
Subject: Re: CREATE TABLE .. LIKE copies comments to an unrelated table
Next
From: Soumen
Date:
Subject: Request to expedite cool-off