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

pgAdmin III: Error on clicking "Display Objects" while doing a restore

From: Nikhil S <nixmisc(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin III: Error on clicking "Display Objects" while doing a restore
Date: 2011-01-29 08:56:30
Message-ID: AANLkTimB6FvguVDUdAHE=mZqybECfWWi_BNaD+LGbM=x@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi,

The following set of operations induce an error:

1. Create a backup file /tmp/pg.backup of an existing database
2. Create a new database
3. Right click and select restore database by specifying this file
4. Clicking on "Display Objects" causes the following error: "An error has
occurred: Schema node not found for object DATABASE postgres [ owner
postgres ]

The frmRestore::OnEndProcess() function, when it reads the toc information,
should ignore the line which contains the entry for the dumped database
itself. So the current code erroneously tries to find the schema to which
the DATABASE object belongs and gives out the above error. The fix is to
ignore the input line which contains the db information. The pg_restore
binary also seems to do the same.

PFA, patch to fix this.

Regards,
Nikhils

Attachment: pgadmin3_error_restore.patch
Description: text/x-diff (728 bytes)

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2011-01-29 09:30:42
Subject: Re: wxWidgets 2.9 build
Previous:From: Dave PageDate: 2011-01-29 08:45:22
Subject: Re: pgAdmin III: crash when trying to save edited pg_hba.conf

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