[pgAdmin][RM4590] Schema Backup fails with names that requires quoting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[pgAdmin][RM4590] Schema Backup fails with names that requires quoting

Aditya Toshniwal
Hi Hackers,

Attached is the patch to fix the schema backup with names that requires double quotes.
Command line has special meaning for double quotes and so the command is run without the double quotes if applied on objects. Code is changed to add extra pairs of quotes to save our object quotes.

Also fixed a test case which was failing if certain paths had spaces in between.

Kindly review.

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

RM4590.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin][RM4590] Schema Backup fails with names that requires quoting

Aditya Toshniwal
Hi Hackers,

Turned out to be an issue only on Mac. Backup works fine for other OS.
Attached is the patch to fix the issue on Mac. Code is changed to add extra pairs of quotes wherever required on MacOS.

Kindly review.

On Thu, Oct 3, 2019 at 3:53 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Attached is the patch to fix the schema backup with names that requires double quotes.
Command line has special meaning for double quotes and so the command is run without the double quotes if applied on objects. Code is changed to add extra pairs of quotes to save our object quotes.

Also fixed a test case which was failing if certain paths had spaces in between.

Kindly review.

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

RM4590_V2.patch (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin][RM4590] Schema Backup fails with names that requires quoting

Akshay Joshi
Hi Aditya

I have tried your patch on MAC. Backup job is completed successfully but got the following message:
pg_dump: last built-in OID is 16383
pg_dump: no matching schemas were found

Please verify it once again and send the modified patch. 

On Tue, Oct 8, 2019 at 5:46 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Turned out to be an issue only on Mac. Backup works fine for other OS.
Attached is the patch to fix the issue on Mac. Code is changed to add extra pairs of quotes wherever required on MacOS.

Kindly review.

On Thu, Oct 3, 2019 at 3:53 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Attached is the patch to fix the schema backup with names that requires double quotes.
Command line has special meaning for double quotes and so the command is run without the double quotes if applied on objects. Code is changed to add extra pairs of quotes to save our object quotes.

Also fixed a test case which was failing if certain paths had spaces in between.

Kindly review.

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin][RM4590] Schema Backup fails with names that requires quoting

Aditya Toshniwal
Hi Hackers,

Attached is the updated patch. Tested on MacOS, Windows 7, Ubuntu 16 and works fine.
Kindly review.

On Wed, Oct 9, 2019 at 1:48 PM Akshay Joshi <[hidden email]> wrote:
Hi Aditya

I have tried your patch on MAC. Backup job is completed successfully but got the following message:
pg_dump: last built-in OID is 16383
pg_dump: no matching schemas were found

Please verify it once again and send the modified patch. 

On Tue, Oct 8, 2019 at 5:46 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Turned out to be an issue only on Mac. Backup works fine for other OS.
Attached is the patch to fix the issue on Mac. Code is changed to add extra pairs of quotes wherever required on MacOS.

Kindly review.

On Thu, Oct 3, 2019 at 3:53 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Attached is the patch to fix the schema backup with names that requires double quotes.
Command line has special meaning for double quotes and so the command is run without the double quotes if applied on objects. Code is changed to add extra pairs of quotes to save our object quotes.

Also fixed a test case which was failing if certain paths had spaces in between.

Kindly review.

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

RM4590_V3.patch (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin][RM4590] Schema Backup fails with names that requires quoting

Akshay Joshi
Thanks, patch applied.

On Wed, Oct 9, 2019 at 2:21 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Attached is the updated patch. Tested on MacOS, Windows 7, Ubuntu 16 and works fine.
Kindly review.

On Wed, Oct 9, 2019 at 1:48 PM Akshay Joshi <[hidden email]> wrote:
Hi Aditya

I have tried your patch on MAC. Backup job is completed successfully but got the following message:
pg_dump: last built-in OID is 16383
pg_dump: no matching schemas were found

Please verify it once again and send the modified patch. 

On Tue, Oct 8, 2019 at 5:46 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Turned out to be an issue only on Mac. Backup works fine for other OS.
Attached is the patch to fix the issue on Mac. Code is changed to add extra pairs of quotes wherever required on MacOS.

Kindly review.

On Thu, Oct 3, 2019 at 3:53 PM Aditya Toshniwal <[hidden email]> wrote:
Hi Hackers,

Attached is the patch to fix the schema backup with names that requires double quotes.
Command line has special meaning for double quotes and so the command is run without the double quotes if applied on objects. Code is changed to add extra pairs of quotes to save our object quotes.

Also fixed a test case which was failing if certain paths had spaces in between.

Kindly review.

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246


--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246