Re: Making view dump/restore safe at the column-alias level

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Making view dump/restore safe at the column-alias level
Дата
Msg-id 24797.1356967630@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Making view dump/restore safe at the column-alias level  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> I do wonder whether the SQL standard will do something obtuse enough
> that that's the only option for a large swathe of queries. Or is that
> the case already? The query syntax you're using here, is it standard
> SQL? Is it widely supported?

Yeah, it's standard --- there's nothing here that wasn't in SQL92.
(Although I notice that SQL still hasn't got any ALTER TABLE RENAME
command, much less a column rename command.  I wonder whether the
committee is aware of these difficulties and has shied away from adding
RENAME because of them?)

As for widely supported, I can't imagine that the big boys don't have
this, although a quick test shows that mysql only has table aliases
not column aliases, ie you can do "FROM t1 AS t1x" but not
"FROM t1 AS t1x(y)".  Still, if that's a consideration, inventing
our own syntax would be even further away from the goal.  Also, the
patch goes to some lengths to not print column aliases unnecessarily
--- in fact, there are cases where the old code would print column
aliases but the patch will not.
        regards, tom lane



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Making view dump/restore safe at the column-alias level
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Behaviour of bgworker with SIGHUP