Re: PGAdmin 3 Patch // Memory Leaks Fixed // Ignore last patch - Mailing list pgadmin-hackers

From Dave Page
Subject Re: PGAdmin 3 Patch // Memory Leaks Fixed // Ignore last patch
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B885D2@mail.vale-housing.co.uk
Whole thread Raw
In response to PGAdmin 3 Patch // Memory Leaks Fixed // Ignore last patch  (efesar <efesar@nmia.com>)
Responses Re: PGAdmin 3 Patch // Memory Leaks Fixed // Ignore last patch  (Þórhallur Hálfdánarson <tolli@tol.li>)
Re: PGAdmin 3 Patch // Memory Leaks Fixed // Ignore  (efesar <efesar@nmia.com>)
List pgadmin-hackers
Hi Keith,

> -----Original Message-----
> From: efesar [mailto:efesar@nmia.com]
> Sent: 06 March 2003 10:35
> To: Dave Page; Pgadmin-Hackers
> Subject: Re: [pgadmin-hackers] PGAdmin 3 Patch // Memory
> Leaks Fixed // Ignore last patch
>
>
>
> > Nice work, thanks. You must have been bored :-). As you can
> probably
> > tell I'm fairly new to C++ and still get a little confused with
> > references & pointers from time to time.
>
> Dave,
>
> I've been programming C++ for years and I consistently have
> memory leaks -- especially in MFC. The really hard part about
> MFC is that it only takes ownership of attached items under
> certain conditions (and of course since it's Microsoft code,
> you never really know when that is). The really *great* thing
> about wxWindows is that if you attach something to a window,
> dialog, frame or control, it's deallocation is *taken care
> of* all the time.

It's good to know there's hope for me yet!

> I'm really confused as to why it's not showing any
> tables/views ... the function is below.

It's because I had System Objects turned off, and as your definition of
a system object is relowner > 1, it ignored all my objects which are
owned by user postgres, id = 1!!!

What you need to do is discount tables and views if they are in the
pg_catalog, pg_temp_* or pg_toast namespaces, and columns is attnum < 1.

> As for the SQL tab,
> it's one way (for now ... which reminds me, do we have a
> "deconstruct sql" function lying around?)

Umm, no. The closest we have is in the query tool in pgAdmin II and it's
big, complex and occasionally falls over. Perhaps we can steal some of
the PostgreSQL parser code for pgAdmin III? I know nothing about how
that works though.

Anyway, now it does some things here, it looks excellent - Nice work!!

> I'm using this program called TortoiseCVS. I can't get WinCVS
> to work to save my life.

Funny that, I could never get TortoiseCVS to work!

> Tortoise works pretty well, but I
> have no idea how patches work for the most part. I just click
> "Make Patch" ... Since there were 6 files that were not in
> CVS, I zipped them in with the .patch file ... but didn't put
> them into any particular subdirectories. If you have
> suggestions on how to make better patches, I'll try em.

I always do it from the command line (I have Cygwin and most of the
tools installed in my laptop).

% cvs -z5 diff <dir/filename>

Iirc. Of course, I only tend to create patches for other projects on odd
occasions.

> I found this document in the wxwindows domain:
>
> http://www.wxwindows.org/technote/patches.htm
>
> I will draw your attention to item #3: cvs diff cannot make a patch
which adds or
> removes a file, so you must use the standalone diff utility to do that
...
>
> Huh? It does my brain no justice to be up this late trying to
interpret what
> that means.

:-). I just send new files manually as you have.

Thanks again for your work.

Regards, Dave.

pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Pgadmin Error
Next
From: Þórhallur Hálfdánarson
Date:
Subject: Re: PGAdmin 3 Patch // Memory Leaks Fixed // Ignore last patch