Re: Adding column in a recursive query - Mailing list pgsql-novice

From Ibrahim Shaame
Subject Re: Adding column in a recursive query
Date
Msg-id CAJOWwD5-b-vyGWuRJ06SqGTy0gcOFcG_+GENi=oWV4e4heLLcA@mail.gmail.com
Whole thread
In response to Re: Adding column in a recursive query  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-novice
Thank you David for clarifying

.
Ibrahim Shaame

On Mon, Mar 30, 2026 at 6:18 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Monday, March 30, 2026, Ibrahim Shaame <ishaame@gmail.com> wrote:
Effectively, after removing the column names from x(jina, namba, nasaba_1) it works now. Thank you very much. But then I don't understand the advantage or inconvenience of naming or not naming the columns there. Is there any explanation somewhere?

SQL is big on providing ways to give aliases/names to things.  It just boils down to readability or, more often, conventions, as to which ones to use.  The CTE column names clause doesn’t get used much that I have seen.  You have to write a full query inside the CTE anyway so column aliases are more conventional.

David J. 

pgsql-novice by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Adding column in a recursive query
Next
From: "Subramanian,Ramachandran"
Date:
Subject: Executing INSERTs from a file but with a wait delay.