BUG #17408: Duplicate aliases silently fail - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17408: Duplicate aliases silently fail
Date
Msg-id 17408-ae0a8b62c0feea01@postgresql.org
Whole thread Raw
Responses Re: BUG #17408: Duplicate aliases silently fail  (Pantelis Theodosiou <ypercube@gmail.com>)
Re: BUG #17408: Duplicate aliases silently fail  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17408
Logged by:          Kevin Potgieter
Email address:      porturpotgieter@gmail.com
PostgreSQL version: 13.6
Operating system:   Not related
Description:

Hi,

Assigning aliases to columns works perfectly.

eg. "SELECT name AS customer_name FROM customers"

However you are able to assign duplicate aliases which does not cause a
conflict

eg. "SELECT name AS customer_name, surname AS customer_name FROM
customers"

The expectation here is that duplicate aliases would cause the query to fail
due to duplicate column names in the result, however there is no error or
warning.

Regards
Kevin


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17407: trim trims more than expected
Next
From: Pantelis Theodosiou
Date:
Subject: Re: BUG #17408: Duplicate aliases silently fail