[FEATURE] Add schema option to all relevant objects - Mailing list pgadmin-hackers

From Thom Brown
Subject [FEATURE] Add schema option to all relevant objects
Date
Msg-id CAA-aLv7MJpohhsa0LJ+LZRCVb6exuO=NVp7s-qRD7QXzDWF8kw@mail.gmail.com
Whole thread Raw
Responses Re: [FEATURE] Add schema option to all relevant objects  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgadmin-hackers
Hi all,

I noticed that objects which can be moved to different schemas can't
be moved in PgAdmin, so I looked to see if there was any request to
have this implemented, and found this ticket:
http://code.pgadmin.org/trac/ticket/5

So I have now implemented this.  A schema drop-down box will appear in
the properties dialogue for each relevant object beneath the owner
drop-down.  I noticed that the Extensions properties dialogue already
had one in it (and I've changed how it works), but left it where it
was.  In order to implement these changes, I had to also fix quite a
few bugs, and while I was at it, implemented a few additional changes.
 They are as follows:

- Prevent functions having a complete rewrite when changing owner
- Add the ability to specify an owner for operators at creation time
- Fix invalid syntax on text search configuration, parser and template
when modifying the name
- Fix unescaped name when modifying text search configuration, parser
and template name
- Disabled the owner field on text search dictionaries as it cannot be modified
- Allow renaming types for versions 8.4 and higher

I also refactored some code, including re-basing the extensions class
on the pgSchema class rather than pgDatabase, replace explicit SET
OWNER clauses with common function and tore out a few things from the
text search classes which were just causing problems rather than
helping.

Anyway, patch attached.  I've tested every object's creation and
modification in various combinations on PostgreSQL 8.4 and 9.0, but if
this patch is a viable candidate for committing then will need testing
on earlier versions too.  Plus some code review since I'm a n00b.
Also look at how I'm selecting the list of schemas in case there
should be any additional ones which should be filtered out.

Cheers!

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

pgadmin-hackers by date:

Previous
From: Jasmin Dizdarevic
Date:
Subject: Re: Fwd: Discussion - Search Objects
Next
From: Guillaume Lelarge
Date:
Subject: Re: Fwd: Discussion - Search Objects