BUG #13273: A query that returns wrongly labeled result instead of syntax error

From: v-brody(at)seznam(dot)cz
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13273: A query that returns wrongly labeled result instead of syntax error
Date: 2015-05-11 22:46:30
Message-ID: 20150511224630.2714.40796@wrigleys.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: 13273
Logged by: Missing comma in SELECT list results in wrong label without error
Email address: v-brody(at)seznam(dot)cz
PostgreSQL version: 9.4.1
Operating system: CentOS Linux
Description:

Following query (notice the missing comma between top-level "x" and "y")
returns 1 (which is "x" value) under label "y" without any warning.

select
"x" "y"
from
(
select
"a" as "x", "b" as "y"
from
(
select 1 as "a", 2 as "b"
) "subquery1"
) "subquery2";

Expected behavior: syntax error

Environment:
PostgreSQL 9.4.1 on Linux version 2.6.32-504.16.2.el6.x86_64

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2015-05-12 00:06:04 Prepare/Execute silently discards prohibited ORDER BY values
Previous Message Peter Geoghegan 2015-05-11 19:25:44 Re: [BUGS] BUG #13148: Unexpected deferred EXCLUDE constraint violation on derived table