Re: [pgAdmin4][Patch]: Fixed RMs #1220 & #1221

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: Fixed RMs #1220 & #1221
Date: 2018-05-03 08:53:20
Message-ID: CA+OCxox+YKTsvASJtY7=LAQ-wtdDtGS6=OVig+A0LiM_31_GdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, May 3, 2018 at 7:59 AM, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
wrote:

> On Thu, May 3, 2018 at 12:25 PM, Khushboo Vashi <
> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>
>>
>>
>> On Wed, May 2, 2018 at 6:03 PM, Ashesh Vashi <
>> ashesh(dot)vashi(at)enterprisedb(dot)com> wrote:
>>
>>> On Wed, May 2, 2018 at 5:56 PM, Akshay Joshi <
>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Khushboo
>>>>
>>>> I have reviewed your code and looks good to me. Can we change the
>>>> message from "The database name is inappropriate" to some meaningful
>>>> message, so that user should know why it is inappropriate. If user will be
>>>> able to create database with "=" in name then why Backup, Maintenance and
>>>> Restore fails.
>>>>
>>>
>>> Just curious, as I understand the problem, we're not able to able to run
>>> pg_dump/pg_restore/psql against the database, which contains '=' in
>>> the name.
>>> Can we use PGDATABASE environment variable for them?
>>>
>>>
>> This way we can implement, but should we consider this way only in case
>> of the database name having "=" ?
>>
> I think - we should do it for all for consistent result.
>
>> Also, the command on the dialogue will not have database name, so user
>> might get confused.
>>
> What need to show as the command line is upto us?
> We can also show PGDATABASE=XXXX as environment variable for this command.
>

Cost vs. benefit; how many people actually use = in their database names,
and of those, how many will back it up using pgAdmin? My guess is that
number is zero, or extremely close to it - and we've only ever had the
issue reported by our own QA people who are intentionally trying to break
this stuff.

Let's just not support external tools on any objects with = in their names.
If there are complaints from users in the future, we can revisit.

>
>>
>>> Of course - this tools may still fail when special characters (e.g. '=')
>>> exists in the name of the database objects (e.g. schema, table, etc).
>>>
>>> It's working with this approach.
>>
> Good to know that.
>
> -- Thanks, Ashesh
>
>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> <http://www.enterprisedb.com/>
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi
>>> <http://www.linkedin.com/in/asheshvashi>*
>>>
>>>>
>>>> On Wed, May 2, 2018 at 3:44 PM, Khushboo Vashi <
>>>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please find the attached patch which will fix RMs # 1220 and #1221.
>>>>>
>>>>> If the database name contains = then the backup, maintenance and
>>>>> restore jobs are failing.
>>>>> To fix these, we will display the error message regarding
>>>>> inappropriate database name.
>>>>>
>>>>> Thanks,
>>>>> Khushboo
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Akshay Joshi*
>>>>
>>>> *Sr. Software Architect *
>>>>
>>>>
>>>>
>>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>>
>>>
>>>
>>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2018-05-03 09:06:33 Re: [pgAdmin4][Patch] Feature #1447 SSH Tunnel
Previous Message Dave Page 2018-05-03 08:50:48 Re: [pgAdmin4][Patch] Feature #1447 SSH Tunnel