BUG #19003: A SELECT that does not return a valid table

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #19003: A SELECT that does not return a valid table
Дата
Msg-id 19003-17a559220b959ea1@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #19003: A SELECT that does not return a valid table
Re: BUG #19003: A SELECT that does not return a valid table
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      19003
Logged by:          Alexandre Bailly
Email address:      alexandrebailly1955@gmail.com
PostgreSQL version: 17.5
Operating system:   Windows
Description:

SELECT 'John' AS nom,'James' AS nom
returns a table with attributes nom and nom that I can see in the output.
The table is invalid because
SELECT nom FROM (SELECT 'John' AS nom,'James' AS nom)
returns
ERROR:  column reference "nom" is ambiguous
LINE 1: SELECT nom FROM (SELECT 'John' AS nom,'James' AS nom).
Returning a table that contains twice the same column should not be
permitted. It should be a nice mathematical property (closure) if a SELECT
always returns a valid table.
Remark:
CREATE TABLE customer
(
nom text,
nom text
);
returns
ERROR:  column "nom" specified more than once.


В списке pgsql-bugs по дате отправления: