Caching-issue when editing function using right-click "CREATE Script" function.

From: Jan Holst Jensen <jan(at)biochemfusion(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Caching-issue when editing function using right-click "CREATE Script" function.
Date: 2016-03-20 21:14:30
Message-ID: 56EF12B6.7030408@biochemfusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

Using pgAdmin 1.22.1 on Windows 7 against Postgres 9.3 on CentOS 6.5.

It is easy to accidentally edit an out-dated version of a function when
using the "CREATE Script" right-click function.

Steps to reproduce:

Create a test function.

create function testfunc() returns text as
$$
begin
return '42';
end;
$$ language plpgsql;

* Use pgAdmin to locate the new function.
* Right-click the function and use "Scripts=>CREATE Script" to edit the
function.

* Edit the function in the SQL Editor so it returns '56'
* Press F5 to run the query and store the new function in the database.
Close the SQL Editor.

* Go back to pgAdmin.
* Right-click the "testfunc()" function and use "Scripts=>CREATE Script"
to edit the function.

You now get the old '42' version of the function shown in the SQL Editor
(the version already cached by pgAdmin). You can work around this
surprising behavior by doing a "Refresh" before right-clicking the
function, but that extra step is easy to miss.

I would expect that right-clicking an object and use "CREATE Script"
would always generate a create script corresponding to the latest
version of the object.

Kind regards
-- Jan Holst Jensen, Biochemfusion Aps (biochemfusion.com), Copenhagen,
Denmark

Browse pgadmin-support by date

  From Date Subject
Next Message Durumdara 2016-03-24 09:58:55 Backup is blinking and show log messages only after the operation is done
Previous Message Jan Holst Jensen 2016-03-20 21:06:56 Missing privilege details on views in pgAdmin 1.22.