Re: Fix for tablename in targetlist

Поиск
Список
Период
Сортировка
От Michael Samuel
Тема Re: Fix for tablename in targetlist
Дата
Msg-id 20010524092509.B8759@miknet.net
обсуждение исходный текст
Ответ на Re: Fix for tablename in targetlist  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, May 19, 2001 at 10:50:31AM -0400, Tom Lane wrote:
> I had a thought this morning that raising an error may be the wrong
> thing to do.  We could instead choose to expand the name into
> "pg_class.*", which would take only a little more code and would
> arguably do something useful instead of useless.  (I suspect that the
> fjoin stuff that still remains in the backend was originally designed
> to support exactly this interpretation.)

This is almost certainly the wrong thing to do.  It would introduce
ambiguity to the syntax, that can only be error prone in the long run.

What happens if people put that kind of query in a view, or hard coded
into a program somewhere, then later decide to ALTER TABLE to add a
column by that name?

If somebody forgets the ".*", they should reasonably expect an error
message. (And, I would personally be annoyed if I didn't get one, and
instead my incorrect query went through)

-- 
Michael Samuel <michael@miknet.net>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: Plans for solving the VACUUM problem
Следующее
От: Don Baccus
Дата:
Сообщение: Re: Plans for solving the VACUUM problem