Re: Feature request: smarter use of conditional indexes

From: John Siracusa <siracusa(at)mindspring(dot)com>
To: Postgres Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Feature request: smarter use of conditional indexes
Date: 2004-03-06 21:55:33
Message-ID: BC6FB305.30DCD%siracusa@mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 3/6/04 4:06 PM, Tom Lane wrote:
> John Siracusa <siracusa(at)mindspring(dot)com> writes:
>> So apparently all I can do is find out if it's a null test, but not if it is
>> specifically "IS NOT NULL"
>
> No, because once you have determined that the node really IsA NullTest,
> you can cast the pointer to (NullTest *) and look at the
> NullTest-specific fields.

I tried casting, but stupidly tried to access the type name (BoolTestType)
instead of the field name (nulltesttype). Duh! :)

> Think of this as poor man's object-oriented programming: Node is the supertype
> of Expr which is the supertype of NullTest (and a lot of other kinds of nodes,
> too).

Yeah, I read that in the comments but was defeated by my devious brain ;)
Thanks, I'll see how much farther I can go before getting stuck again :)

-John

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mike Nolan 2004-03-07 01:16:31 Re: Fixed width rows faster?
Previous Message Tom Lane 2004-03-06 21:06:09 Re: Feature request: smarter use of conditional indexes