SQL Bug?

Поиск
Список
Период
Сортировка
Искать

SQL Bug?

От:
lynch@lscorp.com (Richard Lynch)
Дата:
I'm far from an SQL expert, but...

select field1 from table1 where table2.field2 = table1.field3;

This query, which uses tables in the where clause that aren't in the list
of tables, actually does what one would sorta expect in PostgreSQL, but
isn't it a bug for it to do that?...

Not that I mind, since it's what I accidentally coded anyways.

--
--
-- "TANSTAAFL" Rich lynch@lscorp.com


Re: [SQL] SQL Bug?

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> 
> I'm far from an SQL expert, but...
> 
> select field1 from table1 where table2.field2 = table1.field3;
> 
> This query, which uses tables in the where clause that aren't in the list
> of tables, actually does what one would sorta expect in PostgreSQL, but
> isn't it a bug for it to do that?...
> 
> Not that I mind, since it's what I accidentally coded anyways.

It is a feature we have not removed.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)
FAQ