BUG #17408: Duplicate aliases silently fail

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: porturpotgieter(at)gmail(dot)com
Subject: BUG #17408: Duplicate aliases silently fail
Date: 2022-02-16 10:36:31
Message-ID: 17408-ae0a8b62c0feea01@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17408
Logged by: Kevin Potgieter
Email address: porturpotgieter(at)gmail(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sergei Kornilov 2022-02-16 11:03:41 Re:BUG #17407: trim trims more than expected
Previous Message PG Bug reporting form 2022-02-16 10:13:19 BUG #17407: trim trims more than expected