pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tambet Matiisen <t.matiisen@aprote.ee>
Cc: Martin_Hurst@dom.com
Cc: pgsql-odbc@postgresql.org
Subject: Re: ODBC - adding missing FROM clause entry
Date: Thu, 2 Jan 2003 17:36:29 -0500 (EST)
Message-ID: <200301022236.h02MaTP10061@candle.pha.pa.us> (raw)
In-Reply-To: <81132473206F3A46A72BD6116E1A06AE1B14B9@black.aprote.com>

Tambet Matiisen wrote:
> 
> This is quite odd feature in PostgreSQL. Try this:
> 
> select pg_database.datname from pg_user;
> 
> You will get all database names, each repeated by number of
> users and a note:
> 
> NOTICE:  Adding missing FROM-clause entry for table "pg_database"
> 
> You see, in SELECT you referred a table that is not in FROM
> clause and PostgreSQL is adding it automatically! Seems pretty
> confusing to me, but I didn't dig any further, why is it needed
> or when it this was included.

This feature came from the Berkeley days, so we have had it for a long
time.  In fact, the ODBC code was using it for a few queries which I
just fixed.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (4+ messages)

Message-ID: <200301022236.h02MaTP10061@candle.pha.pa.us>
Permalink:  ../200301022236.h02MaTP10061@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200301022236.h02MaTP10061@candle.pha.pa.us

 · 

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-odbc@postgresql.org
  Cc: pgman@candle.pha.pa.us, t.matiisen@aprote.ee, Martin_Hurst@dom.com
  Subject: Re: ODBC - adding missing FROM clause entry
  In-Reply-To: <200301022236.h02MaTP10061@candle.pha.pa.us>
  References: <81132473206F3A46A72BD6116E1A06AE1B14B9@black.aprote.com> <200301022236.h02MaTP10061@candle.pha.pa.us>

* 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