Re: New warning code for missing FROM relations
От | Philip Warner |
---|---|
Тема | Re: New warning code for missing FROM relations |
Дата | |
Msg-id | 3.0.5.32.20000604123530.020298e0@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | New warning code for missing FROM relations (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: New warning code for missing FROM relations
Re: New warning code for missing FROM relations |
Список | pgsql-hackers |
At 00:40 3/06/00 -0400, Bruce Momjian wrote: > >The regression tests run fine, except for: > > SELECT * > INTO TABLE tmp1 > FROM tmp > WHERE onek.unique1 < 2; > NOTICE: Adding missing FROM-clause entry for table onek Personally I would prefer this to generate an error, eg: Table 'onek' refereenced in the WHERE clause is not in the FROM clause. Is is worth adding yet another setting, eg. set sql92=strict, which would disallow such flagrant breaches of the standard? Maybe it could even be set as the default in template1? I understand that breaking legacy code is a bad idea, so the warning is a good step, but I would prefer an error if I ever write such a statement. Other DBs I've worked with issue warnings for several version before changing default behaviour, so perhaps in version 8.0, the above code could prduce an error by default (unless 'set sql92=relaxed' was specified). P.S. Given that 'set sql92=xxx' may imply that we are enforcing compliance, which is unlikely, maybe it should be 'set implied-tables' or something more specific and meaningful. I have no idea how the 'set' command works, but to avoid a whole lot of new variables, maybe 'set sql-compiance-options=no-implied-tables, no-something-else, allow-another-thing' would allow for expansion... ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.C.N. 008 659 498) | /(@) ______---_ Tel: +61-03-5367 7422 | _________ \ Fax: +61-03-5367 7430 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
В списке pgsql-hackers по дате отправления: