Re: New warning code for missing FROM relations

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: New warning code for missing FROM relations
Date: 2000-06-04 02:58:58
Message-ID: 200006040258.WAA29574@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Yes, that was one of my stated options, return an error.

> 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.

I am concerned about overloading the SET command. Seems we should just
agree on a behavior.

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2000-06-04 03:23:59 Re: New warning code for missing FROM relations
Previous Message Bruce Momjian 2000-06-04 02:35:38 Re: config files in /data