Caching-issue when editing function using right-click "CREATE Script" function. - Mailing list pgadmin-support

From Jan Holst Jensen
Subject Caching-issue when editing function using right-click "CREATE Script" function.
Date
Msg-id 56EF12B6.7030408@biochemfusion.com
Whole thread Raw
List 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



pgadmin-support by date:

Previous
From: Jan Holst Jensen
Date:
Subject: Missing privilege details on views in pgAdmin 1.22.
Next
From: Durumdara
Date:
Subject: Backup is blinking and show log messages only after the operation is done