Re: Same column names in a subresult table

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Durumdara <durumdara(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Same column names in a subresult table
Date: 2021-05-14 14:49:48
Message-ID: CAKFQuwZ2jjbT=sS4FwPh5ih98Xa2emO7tMGOia0tSg8hUFRwUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, May 14, 2021, Durumdara <durumdara(at)gmail(dot)com> wrote:

>
> Is there any way to suppress the original field?
>

Remove the star and list the other columns you do want.

>
> Or say to PGSQL to skip the first XDate field?
>

> Like select t.* (EXCEPT XDate) from t
>

No, though I’ve expressed a desire for this in the past as well.

>
> Or can I reference them by the order?
>

No

>
> Ok, I can solve this problem by renaming the new first XDate, but I want
> to know is there any solution to this problem?
>

No, you need to rename one of them.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-05-14 14:53:12 Re: Query on postgres_fdw extension
Previous Message Tom Lane 2021-05-14 14:42:23 Re: Question about integer out of range in function