Re: [pgAdmin4][Patch]: RM 5053 - Getting an error while changing the columns in the existing view

Akshay Joshi <[email protected]> Tue, 14 Jan 2020 11:47:04 +0530
Newsgroups gmane.comp.db.postgresql.pgadmin.devel
Message-ID <CANxoLDdfJGOASsQVknwHkbk+L4zWP5UdWjPZBsVqtg8hL6-SfA@mail.gmail.com>
--00000000000014dc9e059c138b9b
Content-Type: text/plain; charset="UTF-8"

Hi Khushboo

Following are the review comments:

   - Fix the PEP8 issue.
   - Drop query should be part of the jinja template for consistency.
   Currently, it is added through the python file.
   - Any changes in the view code should not warn the user "Changing the
   columns in a view requires dropping...." and we should not drop the view.
   For example, I have only change the WHERE clause or added 'ORDER BY'.



On Tue, Jan 14, 2020 at 10:27 AM Khushboo Vashi <
[email protected]> wrote:

> Hi,
>
> Please find the attached patch for RM #5053 - Getting an error while
> changing the columns in the existing view.
>
> PostgreSQL doesn't allow to change the view columns. So, while performing
> this task the existing view should be dropped first and then recreate it
> and also user will get a warning first.
>
> Thanks,
> Khushboo
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*

--00000000000014dc9e059c138b9b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi=C2=A0Khushboo<div><br></div><div>Following are the revi=
ew comments:</div><div><ul><li>Fix the PEP8 issue.</li><li>Drop query shoul=
d be part of the jinja template for consistency. Currently, it is added thr=
ough the python file.</li><li>Any changes in the view code should not warn =
the user &quot;Changing the columns in a view requires dropping....&quot; a=
nd we should not drop the view. For example, I have only change the WHERE c=
lause or added &#39;ORDER BY&#39;.=C2=A0</li></ul></div><div><br></div></di=
v><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On T=
ue, Jan 14, 2020 at 10:27 AM Khushboo Vashi &lt;<a href=3D"mailto:khushboo.=
[email protected]" target=3D"_blank">[email protected]</=
a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><d=
iv dir=3D"ltr">Hi,<div><br></div><div>Please find the attached patch for RM=
 #5053 -=C2=A0Getting an error while changing the columns in the existing v=
iew.</div><div><br></div><div>PostgreSQL doesn&#39;t allow to change the vi=
ew columns. So, while performing this task the existing view should be drop=
ped first and then recreate it and also user will get a warning first.</div=
><div><br></div><div>Thanks,</div><div>Khushboo</div><div></div></div>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div dir=3D"l=
tr"><div dir=3D"ltr"><div><font color=3D"#3333FF"><b><span style=3D"color:r=
gb(0,0,0);font-family:arial,sans-serif;font-size:13px;border-collapse:colla=
pse">Thanks &amp; Regards</span></b></font></div><div><font color=3D"#3333F=
F"><b><span style=3D"color:rgb(0,0,0);font-family:arial,sans-serif;font-siz=
e:13px;border-collapse:collapse">Akshay Joshi</span></b></font></div><div><=
font color=3D"#3333FF"><b><span style=3D"color:rgb(0,0,0);font-family:arial=
,sans-serif;font-size:13px;border-collapse:collapse">Sr. Software Architect=
<br></span></b></font></div><div><span style=3D"border-collapse:collapse"><=
font color=3D"#000000" face=3D"arial, sans-serif"><b>EnterpriseDB Software =
India Private Limited</b></font><br></span></div><div><b style=3D"color:rgb=
(51,51,255)"><span style=3D"color:rgb(0,0,0);font-family:arial,sans-serif;f=
ont-size:13px;border-collapse:collapse">Mobile: +91 976-788-8246</span></b>=
<br></div></div></div></div></div></div></div></div></div>

--00000000000014dc9e059c138b9b--