From: | Vadim Mikheev <vadim(at)krs(dot)ru> |
---|---|
To: | "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu> |
Cc: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, tgl(at)sss(dot)pgh(dot)pa(dot)us, hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: type coersion (was OR clause status) |
Date: | 1998-08-18 04:13:06 |
Message-ID: | 35D8FF52.554E1B98@krs.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas G. Lockhart wrote:
>
> It is inside backend/optimizer/path/indxpath.c. I'm using a bit of the
> parser support code to help out. It has to be where the backend actually
> is checking to see if an index is usable, which is in the optimization
> step. Any earlier and we would have to look-ahead at the indices which
> seems inappropriate.
Just let me note that function calls on constants is problem not
only for indices using. Call lower() for each tuple in
WHERE a = lower('bbb') is always bad - lower() eats memory...
> > I think binary compatable types converted is going to be the easiest
> > thing to do for index use. Not sure how you could try and break it.
> > How about character string comparisons using indexes?
Parser could use type_in()/type_out() funcs to do type
coersion...
>
> Will try some more tests, but it seems like it will be hard to break
> since it only comes into effect with built-in datatypes which are
> supposed to be binary compatible.
>
> It would be interesting to try to do constant expressions and function
> calls on constants next, though I'm thinking that it isn't required for
> v6.4.
>
> Vadim, will the executor know how to use a PARAM_EXEC node in any
> context, or will we have to do some coding to get it recognized outside
> of subselects? I'll need to figure out how to build one too, I
> suppose...
I'm not sure... But imho, PARAM_EXEC could be usefull for
now() etc funcs - for non-variant funcs I would suggest
just evaluate them in parser...
Vadim
From | Date | Subject | |
---|---|---|---|
Next Message | t-ishii | 1998-08-18 05:01:03 | odd pg_dump output? |
Previous Message | The Hermit Hacker | 1998-08-18 03:35:02 | Re: [HACKERS] Re: PostgreSQL logos |