Table filter - Mailing list pgsql-general

From Reg Me Please
Subject Table filter
Date
Msg-id 200711211521.57818.regmeplease@gmail.com
Whole thread Raw
Responses Re: Table filter  ("Rodrigo De León" <rdeleonp@gmail.com>)
Re: Table filter  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Hi all.

I've the following concept.

create table t_data
( property text,
  item int8,
  prop_value text
);

(I've cut some fields away needed only for data history).
The meaning is that an entity called by the value of "item" has a number
of properties called by "property" with value "prop_value".
So, for a single "item" there can be many different "property" each with its
own value.

create table t_filters
( filter text
);

create table t_filter_def
( filter text references t_filters,
  property text,
  prop_value l text
);

A filter is a list of property values needed to qualify an entity as
"good". An entity evaluates as good only when all property values in the
filter match the ones associated to an item in t_data.

What's missing to me is how to apply a filter to the t_data and get the list
of the items that evaluate good.

--
Reg me Please
<Non quietis maribus nauta>

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Restart a sequence regularly
Next
From: Chris Browne
Date:
Subject: Re: select with recursive support