Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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                        |
  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

pgsql-odbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group