Skip site navigation (1) Skip section navigation (2)

pgadmin III - "Display objects" part of database restore errors out in non-English locales

From: Nikhil S <nixmisc(at)gmail(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: pgadmin III - "Display objects" part of database restore errors out in non-English locales
Date: 2011-05-18 11:58:40
Message-ID: BANLkTikYccZ85zr_=FygFkiysg00G3QqBA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi,

So, I changed the locale on my setup to "zh_CN.UTF-8" and tried to restore
into a database using a backup from earlier. When I click on "Display
objects" tab, I see an error being displayed, although the actual restore
happens just fine. Note that no error occurs in English locales.

Took me a while to figure this one out. The issue is with
frmRestore::OnEndProcess() function. It naively avoids lines containing ";"
or "P" as the first letter. So in the English locale, the last line about
the "Process returned exit code 0" is handled. However in other locales,
this will be translated and hence the last line will be inspected leading to
a spurious error.

The fix is to avoid inspecting the last line. The attached patch does that.

Regards,
Nikhils

Attachment: pgadmin3_issue_with_display_objects_restore.patch
Description: application/x-download (1017 bytes)

Responses

pgadmin-hackers by date

Next:From: Nikhil SDate: 2011-05-18 12:03:28
Subject: Re: pgadmin III - "Display objects" part of database restore errors out in non-English locales
Previous:From: pgAdmin TracDate: 2011-05-17 19:50:20
Subject: [pgAdmin III] #318: Window sizing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group