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>, "Tom Lane" <tgl(at)sss(dot)pgh(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 13:06:14
Message-ID: 011b01bfce25$acdf7260$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 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.
> >
> > Seems like the real question is what is the goal of having the warning.
> > Are we (a) trying to nag people into writing their queries in an
> > SQL-compliant way, or are we (b) trying to warn about probable mistakes
> > while still considering implicit FROM entries as a fully supported
> > Postgres feature?
> >
> > If the goal is (a) then your way is better, but I like mine if the goal
> > is (b). Seems like some discussion is needed here about just what we
> > want to accomplish.
>
> I agree the goal is (b). However, I can not imagine a query with a FROM
> clause that would ever want to use auto-creation of range entries.

how about:

delete from taba where a=tabb.a;

I think the implicit auto-creation should only be disallowed/warned in
select statements that have a from clause, not update and delete.

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Louis-David Mitterrand 2000-06-04 15:21:49 PG 7.0 crash on SELECT
Previous Message Zeugswetter Andreas 2000-06-04 12:57:50 Re: New warning code for missing FROM relations