Re: pgadmin3 query tools - Mailing list pgadmin-hackers

From Dave Page
Subject Re: pgadmin3 query tools
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B885F6@mail.vale-housing.co.uk
Whole thread Raw
In response to pgadmin3 query tools  (Andreas Pflug <Andreas.Pflug@web.de>)
Responses Re: pgadmin3 query tools  (efesar <efesar@nmia.com>)
Re: pgadmin3 query tools  (efesar <efesar@nmia.com>)
Re: pgadmin3 query tools  (Andreas Pflug <Andreas.Pflug@web.de>)
List pgadmin-hackers
Hi Keith

> -----Original Message-----
> From: efesar [mailto:efesar@nmia.com]
> Sent: 31 March 2003 19:37
> To: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] pgadmin3 query tools
>
>
> > > Sadly,  I'm suffering from a complete lack of desire concerning a
> > > query builder... ;-)
> >
> > No problem, I just don't want 2 seperate query tools.
> >
> > Keith, what are your thoughts?
>
> Dave,
>
> I have a lot so I'm going to number these.
>
> 1. I just got time to try this build. There is a new bug
> where if it can't connect to the server it goes into an
> infinite loop (ok, ok, ok, ok, etc. -- for instance, if the
> server is not running). Starting the server does not help,
> you have to kill the PGA3 process. Then restart PGA3.

Yes, I noticed that as well.

> 2. Andreas, thank you for fleshing out the tree. I believe we
> can use that as a cache. Your additions look great so far.
> Can you let us know which tree items are missing? It looks
> like foreign keys might be missing. Languages, functions,
> operators. We also seem to be missing some of the system
> objects (such as pg_toast, pg_catalog).

I've been thinking about that, and the majority of places we use such
info, we only need to oid & identifier. I wonder if it would be easier
to build some fast, dedicated caches for that instead. We do acctually
have some of these internally in pgSchema (pga2), but in this code they
could be globally accessible within a pgDatabase.

> 3. Andreas' query tool is similar to the old one from PGA2
> ... type the query and it runs. I think that's useful for now.
>
> 4. However, I would like to continue to code my Query Builder
> if that's okay with the both of you. I've done quite a bit of
> work on it. It's visual, and has more functionality and
> usefulness than the MS Query tool. Mine will allow unions and
> extremely complex queries. What we can do is maybe integrate
> the two at some later time so that you can type free-hand
> queries into my query builder and get the result. As you
> know, I made the SQL text box read only for the moment.

What I think might be nice, would be to move the QB code onto a tab with
Andreas' SQL textbox. Leave his grid/explain output tabs at the bottom,
so we have both on one form. Of course, parsing manually entered SQL to
populate the QB fields wouldn't really be an option, but at least we
could take the best bits from your respective work and build a killer
qeury tool.

On a related note (can't remember if I mentioned this), I recently
argued for the addition of the attrelid & attnum fields to the
RowDescription message for the new 7.4 protocol. This will allow us to
more easily build delete/update/insert queries based on user supplied
SQL without going through the fun of parsing the SQL as pga2 does.

> 5. Andreas, I am REALLY REALLY really happy that you used a
> structured style for SQL reconstruction. PGA2 was unreadable
> because it was all on one line. But you might consider using
> a fixed font so that the tabs line up.

'scuse me!! What's wrong with pga2's output? It's multiline - I take
great care to format it nicely in fact...

Talking of which - Andreas, I noticed that tables are being prefixed
with the owner name rather than the schema name.

> 6. Please let me know when this is in CVS. I imagine it will
> be hard to reconcile the two builds. Andreas did a lot of
> work and I imagine he started before the memory leak fix.

Done (cvs currently at 193.195.77.163). I believe Andreas did get your
memory fixes in, but please check.

> So those are my thoughts.

Thanks :-)

Regards, Dave.


pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: WinCVS question
Next
From: efesar
Date:
Subject: Re: pgadmin3 query tools