Re: { SELECT *->NOT(column1, column2) FROM table } syntax idea

Поиск
Список
Период
Сортировка
От Derrick Rice
Тема Re: { SELECT *->NOT(column1, column2) FROM table } syntax idea
Дата
Msg-id BANLkTin+_UwBcviEC0iLQhViPx1EpiVztA@mail.gmail.com
обсуждение исходный текст
Ответ на { SELECT *->NOT(column1, column2) FROM table } syntax idea  ("David Johnston" <polobo@yahoo.com>)
Ответы Re: { SELECT *->NOT(column1, column2) FROM table } syntax idea  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-general


On Wed, Jun 15, 2011 at 6:08 PM, David Johnston <polobo@yahoo.com> wrote:

  The main reason to avoid doing so is to allow for a view to output all the columns of the underlying tables.  If I drop/create the view after altering the underlying tables the new view will have the additional columns without any direct change to the view being required.

 

David J.


Even with CREATE VIEW foo AS SELECT * FROM bar you do not get this behavior.  Try that, then use \dv foo and you'll see that it has expanded the set of columns at CREATE VIEW time.  It will not get any new columns you add to the underlying table.

(tested on 8.4)

So this is a deeper issue than just being able to exclude certain tables.

Derrick

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

Предыдущее
От: "Matthew A. R. Sherian"
Дата:
Сообщение: Further details on cursors.
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: { SELECT *->NOT(column1, column2) FROM table } syntax idea