Re: ODBC - adding missing FROM clause entry

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tambet Matiisen <t(dot)matiisen(at)aprote(dot)ee>
Cc: Martin_Hurst(at)dom(dot)com, pgsql-odbc(at)postgresql(dot)org
Subject: Re: ODBC - adding missing FROM clause entry
Date: 2003-01-02 22:36:29
Message-ID: 200301022236.h02MaTP10061@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Jim Holliday 2003-01-02 23:29:24 BRUCE Momjian - Re: bug in info.c file - incorrect SQL
Previous Message Bruce Momjian 2003-01-02 22:29:25 Re: bug in info.c file - incorrect SQL