Обсуждение: Operator Column

Поиск
Список
Период
Сортировка

Operator Column

От
Itai Zukerman
Дата:
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