From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Réal A(dot) Carbonneau <contact(at)realcarbonneau(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: ERROR: cannot change name of view column |
Date: | 2019-01-01 20:23:24 |
Message-ID: | 11494.1546374204@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Tuesday, January 1, 2019, Réal A. Carbonneau <contact(at)realcarbonneau(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Réal A. Carbonneau | 2019-01-01 21:52:54 | Re: ERROR: cannot change name of view column |
Previous Message | David G. Johnston | 2019-01-01 19:35:08 | Re: ERROR: cannot change name of view column |