Skip site navigation (1) Skip section navigation (2)

SQLF Optimization question

From: "Werner Echezuria" <wercool(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: SQLF Optimization question
Date: 2007-05-31 13:58:27
Message-ID: 2485a25e0705310658k4d7fa8ddse45e9e94dd9b7303@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello, (First of all, sorry for my english),

I'm in a project that involves including sqlf sentences to make postgres
understand the fuzzy querys, i mean, make people to create fuzzy
predicates,  these are words like fat, tall, young, old, in an sql sentence.
I guess the first step is complete. The parser know when an user writes
"CREATE FUZZY PREDICATE <name> ON <domain> AS <fuzzy set>".

For instance, a person can create the young word as a fuzzy predicate like
this: "CREATE FUZZY PREDICATE young ON 0..120 AS (0,0,25,50)", that means,
in a domain of 0..120 a young person is between 25 and 50. The fuzzy set has
the follows: (beg,core1,core2,end), (begin of the set, first core, second
core, end of the set).

The sentence creates a row in a catalog named "pg_fuzzypred", and we're good
till then.

But when I write "Select * from students where age=young", brings me a
message telling me the node isn't exist. My teacher who is very involved in
the project tells me that postgres has to do the derivation principle,
before it gets to the executor (what sounds logical), in order to the
optimizer calculates all costs properly.

It's in this point where i need help, ┬┐What do i have to modify or create to
make postgres undestand the derivation principle, where it's the point in
parser tree goes to query tree and do the optimization?

I send a file, this has all the modification that my teacher and i have make
to postgres (It has some words in spanish, but i guess it's understandable),
and a file with the errors.

Thanks.

Attachment: Resultado.txt
Description: text/plain (5.8 KB)
Attachment: PostgreSQLf 14-05-07.txt
Description: text/plain (14.7 KB)

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-05-31 14:01:53
Subject: Re: Attempt to re-archive existing WAL logs after restoring from backup
Previous:From: Tom LaneDate: 2007-05-31 13:47:38
Subject: Re: pgsql: Make large sequential scans and VACUUMs work in a limited-size

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group