Re: comment on pgAdminIII source

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Knut P(dot) Lehre" <k(dot)p(dot)d(dot)lehre(at)basalmed(dot)uio(dot)no>
Cc: "pgadmin-hackers" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: comment on pgAdminIII source
Date: 2003-04-16 13:48:28
Message-ID: 03AF4E498C591348A42FC93DEA9661B83AF042@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> -----Original Message-----
> From: Knut P. Lehre [mailto:k(dot)p(dot)d(dot)lehre(at)basalmed(dot)uio(dot)no]
> Sent: 16 April 2003 14:12
> To: Dave Page
> Subject: comment on pgAdminIII source
>
>
> I'm sending this email to you in lack of an address of a pgadminIII
> developer mailing list. If such a list exists I would
> acknowledge receiving
> the address so that I can post my comments there.

The list is pgadmin-hackers(at)postgresql(dot)org (I've CC'd this there).

> I downloaded the pgAdminIII source code today (2003.04.16
> about midday
> CETime) from http://cvs.pgadmin.org/cgi-bin/viewcvs.cgi/pgadmin3/src/
> looking for coding examples for postgres schema manipulation.

OK.

> 1) Several of the the pg..... classes (like pgConn,
> PgDatabase etc) are
> bound to wxWindows classes including wxFrame. It would have
> been nice if
> the classes communicating directly with postgres were
> independent of GUI
> framework, so that they more easily could be reused in other
> projects.

Well pgConn is not derived from anything, and as far as I can see at a
glance (it's a while since I wrote it or worked on it) uses only a few
wxWindows classes such as wxString and wxLog itself.

pgDatabase is derived from wxTreeItemData and needs to be to attach to
treeview nodes.

Please remember, we are not trying to develop code for others to take
and use in their own projects (though you are welcome to do so subject
to the licence), but we are developing a program with a specific purpose
and that will always be our primary concern.

> A
> similar comment/question could be: why not use the libpq++ classes in
> pgAdminIII?

Because libpq++ is deprecated and I considered libpqxx to be overkill
for our needs. pgConn, pgSet and pgQueryThread do pretty much all we
need without requiring another project dependency.

> 2) In the pqServer class, code has been added in the
> ctor/dtor (conn =
> NULL; if (conn) delete conn;) (Keith 2003.03.05) to prevent
> memory leaks.
> However, in "pgServer::Connect(...)" a delete appears to be
> missing before
> "conn = new pgConn(...);".

As far as I can see, if conn is a valid pgConn object then it will never
get to that code anyway.

Or am I misunderstanding what you are saying?

Regards, Dave.

Browse pgadmin-hackers by date

  From Date Subject
Next Message frank_lupo 2003-04-16 14:07:44 RE: PGA2: add Locks, fix depend
Previous Message frank_lupo 2003-04-16 07:39:15 PGA2: add Locks, fix depend