Thread: PGAdmin 3 Patch

PGAdmin 3 Patch

From
efesar
Date:
Dave,

Here is my patch file (changes and the relevant new files) for PGAdmin3.
Basically it's all related to QueryBuilder.

-k
www.fearstudios.com
www.efesar.com
www.efesar.com/blog
www.burque.info

=====

I've stopped 6,843 spam messages. You can too!
Get your free, safe spam protection at http://www.cloudmark.com/spamnetsig/

Requirements:

    * Windows 98 / NT / 2000 / XP
    * Outlook 2000 / XP

Attachment

Re: PGAdmin 3 Patch

From
"Dave Page"
Date:
Hi Keith,

Thanks - it's in my queue of things to do...

I did look at the binary, but couldn't get it to do anything. Have you
just been working on the visuals so far?

Regards, Dave.

> -----Original Message-----
> From: efesar [mailto:efesar@nmia.com]
> Sent: 04 March 2003 23:12
> To: Pgadmin-Hackers
> Subject: [pgadmin-hackers] PGAdmin 3 Patch
>
>
>
> Dave,
>
> Here is my patch file (changes and the relevant new files)
> for PGAdmin3. Basically it's all related to QueryBuilder.
>
> -k
> www.fearstudios.com
> www.efesar.com
> www.efesar.com/blog
> www.burque.info
>
> =====
>
> I've stopped 6,843 spam messages. You can too!
> Get your free, safe spam protection at
> http://www.cloudmark.com/spamnetsig/
>
> Requirements:
>
>     *
> Windows 98 / NT / 2000 / XP
>     * Outlook 2000 / XP
>

PGAdmin 3 Patch // Memory Leaks Fixed // Ignore last patch

From
efesar
Date:
Dave,

Nevermind that last patch if you haven't patched it yet.

I got seriously bored of looking at memory leaks in VCC so I went through
and patched all the memory leaks that I could find. Also, there are a couple
of updates on the Query Builder.

Here is a synopsis of changes:

* Drag/Drop functionality in the Query Builer is not functional yet, so use
double clicks/context menus instead. Most of the context/double clicks
actually work in the child windows and in the add table/view window.
* Added and ExecuteSet to pgDatabase (cloned from pgServer), because using
the one from pgServer was choosing random connections/databases.
* pgServer::ExecuteSet (and pgDatabase::ExecuteSet) now returns a pointer
instead of a reference and has to be deleted when you're done with it (this
was the major source of memory leaks because you were converting the pointer
into a reference, ergo the references were being deleted, but not the
objects themselves)
* pgSet::ColName -- column names in PQfname are zero based, not one baseed,
so I had changed "col+1" to "col" for consistency. This might also be true
of PQfsize, but I didn't check.
* Deleted the logger in application OnExit because it was causing memory
leaks.
* Converted all context menus and the image lists to members of frmMain
because they weren't being deleted. Also, deleted them in the destructor
(fixing memory leaks in the process).
* In the application OnInit, syssettings was calling a log function before
the logger was initialized, and the logger requires syssettings, therefore
it was causing a memory leak. I had to delete the log entry from syssettings
OnInit to prevent memory leak (it wasn't being logged anyway).
* frmConnect - it's a modal form, so I turned it into a reference instead of
a pointer to prevent memory leaks  and also so that you don't have to call
destroy or delete. I think it's called in pgConn::OnConnect().
* frmConnect - it's now returning IDOK and IDCANCEL to be more visible.

As a side note, I figured out the problem with caching. I can't cache
anything yet because the database objects aren't loaded in the treeview
(there's no functionality for that yet). So for now, to make the Query
Builder functional, I must use raw SQL calls. However, I will build it with
the idea in mind that later we will take info from the cache (whatever it's
architecture happens to be).

As usual, I think you can ignore the project file. Just make sure to add the
new cpp/h files in the appropriate places.

-Keith

Attachment