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

Re: Fwd: Filter by Selection on Grid

From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Robins Tharakan" <tharakan(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Fwd: Filter by Selection on Grid
Date: 2008-02-07 11:20:36
Message-ID: 937d27e10802070320n3573bb49rc86bac308ac18109@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi.

On Feb 6, 2008 5:42 PM, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:
> Hi,
>
> The attached patch does this:
> 1. Sanitize the if-else bracket style for the earlier patch.
> 2. Use 'IS DISTINCT FROM' instead of <> in an exclusion condition.
>
> Two issues remain that I can't resolve:
> 1. Rightly as you point out thread->IsRunning() needs to be called only if
> it exists. On rigorous testing the application bombs if this thread is
> non-existent (backtrace attached). Any good way to check whether a thread is
> running ? Any flag etc ?

I think you misunderstood my previous message. I committed your patch
to SVN, and cleaned up the formatting, added the test to ensure thread
is valid, and added the proper quoting.

So at this point you should svn update and start working from svn
trunk again to add the IS DISTINCT FROM and duplicate sort prevention.

> 2. The case of selection and deselection of the same field name can
> (ideally) cause a bit of a complication.
> Consider this:
> a. M=10 AND M <> 10
> b. M = 10 AND (N = 10 OR M <> 10)
> If we are to filter out the old test condition replacing it with a new test
> condition using a string parser how does it understand the difference
> between case (a) and case (b) ? Unless I am missing the point, I think to
> effectively resolve this would need a inverted tree structure for the where
> clause which I think is a bit of an overkill for now ?

Well the code you are adding is primarily a shortcut which is likely
not going to be used by someone at the same time as they manually
author filter strings - so I say we just document the potential issue
and leave it at that. I'm more concerned about the sorting side where
it should be trivial to detect the duplicate.

Speaking of which, this feature should have a paragraph or two in the
docs - I forgot to mention that, sorry (we've been waiting to release
8.3 for months so I'm somewhat rusty at this!).

Thanks, Dave.

In response to

Responses

pgadmin-hackers by date

Next:From: svnDate: 2008-02-07 13:05:25
Subject: SVN Commit by dpage: r7061 - trunk/www/development
Previous:From: Robins TharakanDate: 2008-02-06 17:42:26
Subject: Re: Fwd: Filter by Selection on Grid

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