Re: [HACKERS] indexes and floats

From: dg(at)informix(dot)com (David Gould)
To: vadim(at)krs(dot)ru (Vadim Mikheev)
Cc: dg(at)informix(dot)com, brook(at)trillium(dot)nmsu(dot)edu, maillist(at)candle(dot)pha(dot)pa(dot)us, lockhart(at)alumni(dot)caltech(dot)edu, tgl(at)sss(dot)pgh(dot)pa(dot)us, hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] indexes and floats
Date: 1998-08-07 06:06:37
Message-ID: 9808070606.AA19690@hawk.illustra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Vadim writes:
> Imho, we have to treat random() etc differently in target list and
> qual! WHERE defines set of rows to be returned by query, functions
> in target list define representation of this set.

Maybe, but it sure makes the system harder to explain. For example, what
happens to a function in the target list of a subquery select? And what
should happen.

But, perhaps we should just do whatever is easiest since anyone who writes
a query:

select * from x where x.key = random();

probably deserves whatever they get ;-)

Seriously, I have never seen random used in a where clause. And I don't think
that queries like

select * from events where event.time = timenow();

make a lot of sense either. How did event.time get to be _equal_ to the
current time. Given that it had to be inserted earlier and the time of
the select would not have been known then.

My point is anyone who uses a variant function in a where clause already
is pretty confused. To tell them that variant functions aren't variant when
used in where clauses probably will just confuse them more.

-dg

David Gould dg(at)illustra(dot)com 510.628.3783 or 510.305.9468
Informix Software (No, really) 300 Lakeside Drive Oakland, CA 94612
- If simplicity worked, the world would be overrun with insects. -

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey E. Levov 1998-08-07 07:26:50 Re: [HACKERS] SPI procedure for removing large objects
Previous Message David Gould 1998-08-07 05:58:40 Re: [HACKERS] indexes and floats