Thread: Possible defects with extensions in pgadmin3-1.14.2

Possible defects with extensions in pgadmin3-1.14.2

From
"James B. Byrne"
Date:
CentOS-6.2
PostgreSQL-9.1.2
PGAdmin3-1.14.2

All installed via yum from repo at postgresql.org.

I previously sent this report to the pg users list:

First:
When viewing the properties of the plpgsql extension the
sql pane of the properties window of PGAdmin incorrectly
gives the command ALTER EXTENSION 'plpgsql' OWNER TO . . .

OWNER is not valid syntax for the ALTER EXTENSION command.Instead it should be ALTER LANGUAGE ;plpgsql' OWNER TO .
. .


Second:
I encountered a strange inconsistency with PGAdmin3-1.14.2
relating to this.  After executing "ALTER LANGUAGE plpgsql
OWNER TO devl;" in the SQL query pane inside PGAdmin3 the
extension ownership change is never reflected in the
object properties pane.

Even when disconnecting and reconnecting to the server
after making the the change the properties pane of the
extension in that database continues to show the plpgsql
extension owner as postgres.  psql on the other hand
immediately shows that the new language owner is as
expected following the change inside PGAdmin3.

-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3



Re: Possible defects with extensions in pgadmin3-1.14.2

From
Guillaume Lelarge
Date:
On Tue, 2012-02-28 at 17:04 -0500, James B. Byrne wrote:
> CentOS-6.2
> PostgreSQL-9.1.2
> PGAdmin3-1.14.2
> 
> All installed via yum from repo at postgresql.org.
> 
> I previously sent this report to the pg users list:
> 
> First:
> When viewing the properties of the plpgsql extension the
> sql pane of the properties window of PGAdmin incorrectly
> gives the command ALTER EXTENSION 'plpgsql' OWNER TO . . .
> 
> OWNER is not valid syntax for the ALTER EXTENSION command.
>  Instead it should be ALTER LANGUAGE ;plpgsql' OWNER TO .
> . .

You're right. The extension dialog doesn't even show the owner. It's
fixed now.

> Second:
> I encountered a strange inconsistency with PGAdmin3-1.14.2
> relating to this.  After executing "ALTER LANGUAGE plpgsql
> OWNER TO devl;" in the SQL query pane inside PGAdmin3 the
> extension ownership change is never reflected in the
> object properties pane.
> 

Apart from the fact that we shouldn't display a owner of an extension,
there is no bug here. The extension plpgsql installs the language
plpgsql. They are different objects. So, when you change the owner of
the language, there is no change on the extension.

> Even when disconnecting and reconnecting to the server
> after making the the change the properties pane of the
> extension in that database continues to show the plpgsql
> extension owner as postgres.  psql on the other hand
> immediately shows that the new language owner is as
> expected following the change inside PGAdmin3.
> 

You compare two different things. You look into the extension nodes in
pgadmin and in the languages list in psql. If you looked at the language
nodes in pgadmin, you'd have noticed that the owner changed.

Anyway, you won't have the issue now with the fix I commited a few
minutes ago.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com