From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Matthias Luedtke <matthias-luedtke(at)gmx(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Modifying SQL parser with extensions? |
Date: | 2006-10-29 20:41:03 |
Message-ID: | 20061029204103.GC4665@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Matthias Luedtke wrote:
>
> Alvaro Herrera wrote:
> >>In fact, parsing this SQL dialect would just be the first step, as the
> >>annotations within the query induce an ordering of the result set.
> >
> >Huh, what is this supposed to be able to do that you can't do with the
> >already existing ORDER BY clause?
>
> Basically, conditional statements are annotated with integers that
> represent weights, like
>
> (...)WHERE (foo = 'a')[42] OR (bar = 'b')[20]
Hummm, doesn't this sound suspiciously close to the "skyline" algorithm
type stuff? AFAIU skyline allowed you to specify conditions and weights
for each one, and redefined ORDER BY to work following those. In that
case, I may as well point out that there's a couple of gals working on
this. They hang out on the pgsql-es-ayuda list (in spanish). They have
the grammar part working, at least.
I think this particular example could be made work by using CASE
constructs. I'm not sure how efficient or cumbersome that would turn
out to be. (That particular notation has the drawback that the [n]
would be interpreted as an array index though.)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Dawid Kuroczko | 2006-10-29 22:00:52 | Re: Wordpress & PostgreSQL ... |
Previous Message | Dawid Kuroczko | 2006-10-29 20:41:02 | Re: Modifying SQL parser with extensions? |