pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Bradley Kieser <brad@kieser.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Where to submit a bug report?
Date: Tue, 4 May 2004 15:36:31 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0405041535590.32240-100000@css120.ihs.com> (raw)
In-Reply-To: <20040504181902.GA11727@wolff.to>

On Tue, 4 May 2004, Bruno Wolff III wrote:

> On Tue, May 04, 2004 at 18:50:09 +0000,
>   Bradley Kieser <brad@kieser.net> wrote:
> > Hi All,
> > 
> > Is this the correct place to submit a bug report or should I do it 
> > somewhere else?
> 
> Bugs go to pgsql-bugs, how I don't think this is really a bug, but
> a "feature".
> 
> > 
> > BUG DETAILS:
> > 
> > PG version 7.4.2
> > Platform: Linux
> > 
> > BUG DESC:
> > 
> > Using aliases in the "select" part of a select clause isn't strongly 
> > checked against the alias definitions in the FROM part of the SQL. 
> > Specifically, if the alias in the "select" clause matches another table 
> > name (not in the FROM list), then the select is applied against that 
> > other table whereas the correct action would be to chuck and error.
> > 
> > EXAMPLE:
> > 
> > One table: acct_dets
> > One view: acct_dets_view created as select * from acct_dets_table where XXXX
> > 
> > Select acct_dets.aaa, acct_dets.bbb from acct_dets_view;
> > 
> > The above select is accepted and processed when it SHOULD throw an error.
> 
> Postgres has a feature where tables not listed in FROM clauses get silently
> included. There is something that turns this off, but I think it is
> only available in the development version. This feature is really only
> useful for delete where there isn't a syntax to specify addition tables
> and you need to use a subquery instead. A number of people didn't like the
> way it works now as that usually when you end up using this feature
> it is a mistake in the query rather than intentional use.

It's in 7.4 and it's called:

#add_missing_from = true

uncomment that and set it to false and it should error out as expected. 




view thread (3+ messages)

Message-ID: <Pine.LNX.4.33.0405041535590.32240-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0405041535590.32240-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0405041535590.32240-100000@css120.ihs.com

 · 

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-admin@postgresql.org
  Cc: scott.marlowe@ihs.com, bruno@wolff.to, brad@kieser.net
  Subject: Re: Where to submit a bug report?
  In-Reply-To: <Pine.LNX.4.33.0405041535590.32240-100000@css120.ihs.com>
  References: <20040504181902.GA11727@wolff.to> <Pine.LNX.4.33.0405041535590.32240-100000@css120.ihs.com>

* 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