Re: ERROR: cannot change name of view column
От | Tom Lane |
---|---|
Тема | Re: ERROR: cannot change name of view column |
Дата | |
Msg-id | 11494.1546374204@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: ERROR: cannot change name of view column ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: ERROR: cannot change name of view column
|
Список | pgsql-bugs |
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Tuesday, January 1, 2019, Réal A. Carbonneau <contact@realcarbonneau.com> > wrote: >> Since CREATE ... OR REPLACE is literally: "if exists, drop and create, >> else, create", > It’s specifically saying “replace the query used for the view without > changing the view signature/type”. Right, it's *not* a DROP. If it were, we'd make dependent views go away, and the concern for preserving the view's rowtype would be much less. > Same goes for create or replace > function. The point being the signature is public and cannot be changed on > the fly but the implementation can be replaced. The analogy to functions is on-point here. We used to allow CREATE OR REPLACE FUNCTION to change the names of function parameters, but we had to disallow that (or at least greatly restrict it, I don't remember details right now) when we started allowing calls that use parameter names to disambiguate arguments. regards, tom lane
В списке pgsql-bugs по дате отправления: