pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tanes@siamscan.net
To: pgsql-bugs@postgresql.org
Cc: tanes@siamscan.net
Subject: BUG #14919: Invalid column in sub select is still a valid select
Date: Mon, 20 Nov 2017 07:26:24 +0000
Message-ID: <20171120072624.1469.36777@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      14919
Logged by:          Tanes Sriviroolchai
Email address:      tanes@siamscan.net
PostgreSQL version: 9.3.18
Operating system:   Ubuntu 14.04
Description:        

Not sure if this is a bug or feature but when I query with sub select while
sub select has invalid column the query is still valid and running. For
example:

create temp table a ( id integer, descr text);
create temp table b ( b_id integer, descr text);

# select * from a where id=(select id from b where descr='A');

 id | descr 
----+-------
(0 rows)

# select id from b where descr='A';

ERROR:  column "id" does not exist
LINE 1: select id from b where descr='A';
               ^




view thread (5+ messages)  latest in thread

Message-ID: <20171120072624.1469.36777@wrigleys.postgresql.org>
Permalink:  ../20171120072624.1469.36777@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20171120072624.1469.36777@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tanes@siamscan.net
  Subject: Re: BUG #14919: Invalid column in sub select is still a valid select
  In-Reply-To: <20171120072624.1469.36777@wrigleys.postgresql.org>
  References: <20171120072624.1469.36777@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox