[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: alter table impact on view
From:       Marc Millas <marc.millas () mokadb ! com>
Date:       2023-01-30 14:15:48
Message-ID: CADX_1aa2DdghRJZg6rf3=m0WdP8r8h4-wj3TmnAQ4GQd5R1s3g () mail ! gmail ! com
[Download RAW message or body]

A bit sad

Thanks..

Le lun. 30 janv. 2023 =C3=A0 13:53, David Rowley <dgrowleyml@gmail.com> a =
=C3=A9crit :

> On Tue, 31 Jan 2023 at 01:14, Marc Millas <marc.millas@mokadb.com> wrote:
> > But if I alter table to change a column that is a varchar 20 into a
> varchar 21
> > postgres refuse saying that it cannot due to the return rule... using
> said column
> >
> > why ?? as the view is not a materialized object, the impact of the
> length of a column of an underlying table do change the description of th=
e
> view, clearly, but I dont see where the difficulty is "hidden". Can someo=
ne
> enlighten me?
>
> Primarily because nobody has written the required code.
>
> In [1], which is now quite old, there was some discussion about
> various aspects of making this better. Perhaps changing the typmod is
> easier than changing the type completely, but we still don't have any
> code for it. So for now, you're just stuck manually dropping and
> recreating your views.
>
> David
>
> [1]
> https://www.postgresql.org/message-id/603c8f070807291912x37412373q7cd7dc3=
6dd55a8a7@mail.gmail.com
>

[Attachment #3 (text/html)]

<div dir="auto">A bit sad<div dir="auto"><br></div><div dir="auto">Thanks..  \
</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 30 \
janv. 2023 Ã  13:53, David Rowley &lt;<a \
href="mailto:dgrowleyml@gmail.com">dgrowleyml@gmail.com</a>&gt; a écrit  \
:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">On Tue, 31 Jan 2023 at 01:14, Marc Millas &lt;<a \
href="mailto:marc.millas@mokadb.com" target="_blank" \
rel="noreferrer">marc.millas@mokadb.com</a>&gt; wrote:<br> &gt; But if I alter table \
to change a column that is a varchar 20 into a varchar 21<br> &gt; postgres refuse \
saying that it cannot due to the return rule... using said column<br> &gt;<br>
&gt; why ?? as the view is not a materialized object, the impact of the length of a \
column of an underlying table do change the description of the view, clearly, but I \
dont see where the difficulty is &quot;hidden&quot;. Can someone enlighten me?<br> \
<br> Primarily because nobody has written the required code.<br>
<br>
In [1], which is now quite old, there was some discussion about<br>
various aspects of making this better. Perhaps changing the typmod is<br>
easier than changing the type completely, but we still don&#39;t have any<br>
code for it. So for now, you&#39;re just stuck manually dropping and<br>
recreating your views.<br>
<br>
David<br>
<br>
[1] <a href="https://www.postgresql.org/message-id/603c8f070807291912x37412373q7cd7dc36dd55a8a7@mail.gmail.com" \
rel="noreferrer noreferrer" \
target="_blank">https://www.postgresql.org/message-id/603c8f070807291912x37412373q7cd7dc36dd55a8a7@mail.gmail.com</a><br>
 </blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic