Re: New warning code for missing FROM relations

From: "Zeugswetter Andreas" <andreas(dot)zeugswetter(at)telecom(dot)at>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New warning code for missing FROM relations
Date: 2000-06-04 12:57:50
Message-ID: 010901bfce24$af521580$ef23080a@sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > I have committed new warning code to alert users who auto-create
> > > relations without knowing it.
> > > The code issues the warning if it auto-creates a range table entry, and
> > > there is already a range table entry identified as coming from a FROM
> > > clause. Correlated subqueries should not be a problem because they are
> > > not auto-created.
> >
> > I still prefer the suggestion I made before: complain only if the
> > implicit FROM entry is for a table already present in the rangelist
> > (under a different alias, obviously). The fact that that choice
> > would not break any existing regression tests seems relevant...
>
> But it seems mine is going to complain if they forget one in a FROM
> clause, which sort of makes sense to me. I can do your suggestion, but
> this makes more sense. Can we get some other votes?

I like it the way you did it. Personally I would even throw an error,
but that would probably be too strict.

I would change the regressiontest to add onek to the from clause,
and not make it throw the warning.
Imho this example is only good to demonstrate how you can
misuse a feature.

There are good examples for using it, but all of those that I can think of
don't have a from clause.

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas 2000-06-04 13:06:14 Re: New warning code for missing FROM relations
Previous Message Zeugswetter Andreas 2000-06-04 11:33:53 Re: AW: AW: Proposal for enhancements of privilege system