Operator Column - Mailing list pgsql-sql

From Itai Zukerman
Subject Operator Column
Date
Msg-id 87snq1oulu.fsf@matt.w80.math-hat.com
Whole thread Raw
List pgsql-sql
I'd like to do something like this:

create table value ( x int4 )

create index on value ( x )

create table filter ( op oid references pg_operator, endpoint int4
)

select value.x
from value, filter
where value.x filter.op filter.endpoint

That is, I want the filter table to specify the operator used in the
select (filter.op will be one of the comparison operators for int4).

1.  Can this be done?
2.  In such a way as to make use of the index on value?

-itai



pgsql-sql by date:

Previous
From: Indraneel Majumdar
Date:
Subject: Re: dynamic object creation
Next
From: Itai Zukerman
Date:
Subject: Variable-length Types