AW: New warning code for missing FROM relations

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Peter Eisentraut'" <peter_e(at)gmx(dot)net>
Cc: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: New warning code for missing FROM relations
Date: 2000-06-05 08:02:55
Message-ID: 219F68D65015D011A8E000006F8590C604AF7DC0@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > > SELECT *
> > > INTO TABLE tmp1
> > > FROM tmp
> > > WHERE onek.unique1 < 2;
> > > NOTICE: Adding missing FROM-clause entry for table onek
>
> > Is is worth adding yet another setting, eg. set sql92=strict, which
> > would disallow such flagrant breaches of the standard?
>
> SQL provides for facility called the SQL Flagger, which is
> supposed to do
> exactly that. This might sound like an interesting idea but
> in order for
> it to be useful you'd have to maintain it across the board,
> which sounds
> like a major head ache.
>
> The irony in the given example is that the SELECT INTO
> command isn't in
> the standard in the first place so you'd have to create all sorts of
> double standards. Certain things would be "extensions", certain things
> would be "misuse". And for all it's worth, we have no idea
> which is which.
>
> If you want to throw about warnings about "probable" coding
> errors and the
> like one *must* be able to switch them off. Either something is right,
> then you shut up. Or it's wrong, then you throw an error. Or
> you're not
> sure, then you better leave it up to the user.

Yes, only Bruce and I are of the opinion that it *is* an Error, and I guess
we want some consensus.
The notice is imho of the sort: notice this syntax is going to be disallowed
soon.

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2000-06-05 08:44:24 RE: pg on NT
Previous Message The Hermit Hacker 2000-06-05 06:15:22 anti-relay features ...