pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Itai Zukerman <zukerman@math-hat.com>
To: pgsql-sql@postgresql.org
Subject: Operator Column
Date: 13 Oct 2000 07:20:45 -0400
Message-ID: <87snq1oulu.fsf@matt.w80.math-hat.com> (raw)

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




Message-ID: <87snq1oulu.fsf@matt.w80.math-hat.com>
Permalink:  ../87snq1oulu.fsf@matt.w80.math-hat.com/
Also on:    postgresql.org/message-id/87snq1oulu.fsf@matt.w80.math-hat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: zukerman@math-hat.com
  Subject: Re: Operator Column
  In-Reply-To: <87snq1oulu.fsf@matt.w80.math-hat.com>
  References: <87snq1oulu.fsf@matt.w80.math-hat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox