Re: Same column names in a subresult table - Mailing list pgsql-general

From David G. Johnston
Subject Re: Same column names in a subresult table
Date
Msg-id CAKFQuwZ2jjbT=sS4FwPh5ih98Xa2emO7tMGOia0tSg8hUFRwUQ@mail.gmail.com
Whole thread Raw
In response to Same column names in a subresult table  (Durumdara <durumdara@gmail.com>)
List pgsql-general
On Friday, May 14, 2021, Durumdara <durumdara@gmail.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.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Question about integer out of range in function
Next
From: Tom Lane
Date:
Subject: Re: Query on postgres_fdw extension