Re: Fix for tablename in targetlist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix for tablename in targetlist
Date: 2001-05-19 15:33:38
Message-ID: 262.990286418@sss.pgh.pa.us
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:
> Seems a tablename with no FROM clause doesn't get marked as isRel
> because it is not in the range table to be matched.

> What would happen if we added auto-star is that a table name in a target
> list would automatically become tablename.*. Seems it is too prone to
> cause bad queries to be accepted.

No; the auto-star would only happen if the thing is marked isRel.
So it would just cover the case of "select tab from tab". It seems
reasonable to me --- what other possible interpretation of the meaning
is there?

I tend to agree that we should not change the code to make "select tab"
work, on the grounds of error-proneness.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2001-05-19 16:04:37 Re: C++ Headers
Previous Message Tom Lane 2001-05-19 15:28:33 Re: Re: External search engine, advice