Re: Adding column in a recursive query

From: Ibrahim Shaame <ishaame(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "depesz(at)depesz(dot)com" <depesz(at)depesz(dot)com>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: Adding column in a recursive query
Date: 2026-04-05 10:01:09
Message-ID: CAJOWwD5-b-vyGWuRJ06SqGTy0gcOFcG_+GENi=oWV4e4heLLcA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thank you David for clarifying

.
Ibrahim Shaame

On Mon, Mar 30, 2026 at 6:18 PM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Monday, March 30, 2026, Ibrahim Shaame <ishaame(at)gmail(dot)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.
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Subramanian,Ramachandran 2026-04-14 08:17:12 Executing INSERTs from a file but with a wait delay.
Previous Message David G. Johnston 2026-03-30 15:18:09 Re: Adding column in a recursive query