Re: Fix for tablename in targetlist - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix for tablename in targetlist
Date
Msg-id 262.990286418@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix for tablename in targetlist  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Fix for tablename in targetlist  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: External search engine, advice
Next
From: Larry Rosenman
Date:
Subject: Re: C++ Headers