[FEATURE] Add schema option to all relevant objects

From: Thom Brown <thom(at)linux(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [FEATURE] Add schema option to all relevant objects
Date: 2011-07-05 19:23:16
Message-ID: CAA-aLv7MJpohhsa0LJ+LZRCVb6exuO=NVp7s-qRD7QXzDWF8kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
add_schemas_to_all_items.patch text/x-patch 82.7 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2011-07-05 19:28:57 Re: Fwd: Discussion - Search Objects
Previous Message Jasmin Dizdarevic 2011-07-04 21:42:12 Re: Fwd: Discussion - Search Objects