Skip site navigation (1) Skip section navigation (2)

RFD: PostgreSQL Schema Support

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: RFD: PostgreSQL Schema Support
Date: 2002-04-05 12:40:37
Message-ID: FED2B709E3270E4B903EB0175A49BCB1293354@dogbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgadmin-hackers
I'm currently starting to implement support for some of the more desirable
features of PostgreSQL 7.3 which is now well in development. One of these
areas (which are all now on the ToDo list incidently) is Schema support.
There are a number of ways we could implement this, and I'd like to get some
feedback on what people think is right.

Note; Schemas will probably end up being called Namespaces in pgSchema
because of the obvious naming conflict (that's what Tom Lane's been calling
the related catalogues and columns in PostgreSQL itself).

1) The most basic design. 
     - Add Namespaces & pgNamespace classes under pgDatabase.
     - Add a Namespace property to all objects that can live in a Namespace.
     - Allow selection of a Namespace when creating objects.

   Pros:
     - Relatively simple & easy to implement.

   Cons:
     - Very 'bolted on' design.

2) The middle of the road approach.
     - Add Namespaces & pgNamespace classes under pgDatabase.
     - *Move* classes such as Tables & Sequences etc. from pgDatabase to
pgNamespace.
     - Add a ctx.CurrentNamespace property to clsContext in pgAdmin.

   Pros:
     - The object hierarchy will be correct.

   Cons:
     - Lose backward compatibility with PostgreSQL < 7.3.

3) The whole shebang.
     - Add Namespaces & pgNamespace classes under pgDatabase.
     - *Copy* classes such as Tables & Sequences etc. from pgDatabase to
pgNamespace.
     - Add a ctx.CurrentNamespace property to clsContext in pgAdmin.
     - Recode pgAdmin to use the current object hierarchy with PostgreSQL <
7.3, otherwise the new.

   Pros:
     - Backwards compatibility is maintained.
     - The object hierarchy will be correct.

   Cons:
     - The code will be *very* complex, and probably incomprehensible to
most developers.
     -  By far the most amount of work.

Comments and other suggestions would definitely be well received with this
one :-)

Regards, Dave.

Responses

pgadmin-hackers by date

Next:From: Rod TaylorDate: 2002-04-05 14:34:04
Subject: Re: RFD: PostgreSQL Schema Support
Previous:From: Tim FinchDate: 2002-04-03 08:44:36
Subject: Re: Latest DataTable Code

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group