Received: from zukerman-1.dsl.speakeasy.net (zukerman-1.dsl.speakeasy.net [216.254.75.142]) by hub.org (8.10.1/8.10.1) with ESMTP id e9DBKkr73308 for ; Fri, 13 Oct 2000 07:20:46 -0400 (EDT) Received: from (matt.w80.math-hat.com) [216.254.75.141] by zukerman-1.dsl.speakeasy.net with esmtp (Exim 3.12 #1 (Debian)) id 13k2nW-0000Aa-00; Fri, 13 Oct 2000 07:14:46 -0400 Received: from zukerman by matt.w80.math-hat.com with local (Exim 3.16 #1 (Debian)) id 13k2tJ-0002i6-00 for ; Fri, 13 Oct 2000 07:20:45 -0400 To: pgsql-sql@postgresql.org Subject: Operator Column From: Itai Zukerman Date: 13 Oct 2000 07:20:45 -0400 In-Reply-To: "Oliver Elphick"'s message of "Wed, 11 Oct 2000 14:42:05 +0100" Message-ID: <87snq1oulu.fsf@matt.w80.math-hat.com> Lines: 23 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200010/129 X-Sequence-Number: 1791 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