[HACKERS] index suggestion for 7.4

2003-05-31 Thread Bruno Wolff III
Now that expressions can be used in indexes in 7.4 you can have multicolumn indexes that are ordered in different directions. However the planner doesn't seem to understand that order by -col asc is the same as order by col desc (for at least the normal -) so you have to be careful how you write

Re: [HACKERS] index suggestion for 7.4

2003-05-31 Thread Tom Lane
Bruno Wolff III [EMAIL PROTECTED] writes: Now that expressions can be used in indexes in 7.4 you can have multicolumn indexes that are ordered in different directions. However the planner doesn't seem to understand that order by -col asc is the same as order by col desc (for at least the

Re: [HACKERS] index suggestion for 7.4

2003-05-31 Thread Stephan Szabo
On Fri, 30 May 2003, Bruno Wolff III wrote: Now that expressions can be used in indexes in 7.4 you can have multicolumn indexes that are ordered in different directions. However the planner doesn't seem to understand that order by -col asc is the same as order by col desc (for at least the

Re: [HACKERS] index suggestion for 7.4

2003-05-31 Thread Bruno Wolff III
On Fri, May 30, 2003 at 10:42:24 -0700, Stephan Szabo [EMAIL PROTECTED] wrote: On Fri, 30 May 2003, Bruno Wolff III wrote: Now that expressions can be used in indexes in 7.4 you can have multicolumn indexes that are ordered in different directions. However the planner doesn't seem to

Re: [HACKERS] index suggestion for 7.4

2003-05-31 Thread Stephan Szabo
On Fri, 30 May 2003, Bruno Wolff III wrote: On Fri, May 30, 2003 at 10:42:24 -0700, Stephan Szabo [EMAIL PROTECTED] wrote: On Fri, 30 May 2003, Bruno Wolff III wrote: Now that expressions can be used in indexes in 7.4 you can have multicolumn indexes that are ordered in different

Re: [HACKERS] index suggestion for 7.4

2003-05-31 Thread Bruno Wolff III
On Fri, May 30, 2003 at 11:31:23 -0700, Stephan Szabo [EMAIL PROTECTED] wrote: On Fri, 30 May 2003, Bruno Wolff III wrote: I was hoping the new stuff Tom added would make doing this easier. The issue has come up before and at least at that time it didn't get changed so I expected it

Re: [HACKERS] index suggestion for 7.4

2003-05-31 Thread Tom Lane
Bruno Wolff III [EMAIL PROTECTED] writes: I went back and reread the stuff on NEGATOR and found it only applies to operators that return boolean types. I had thought it was different and would let you make the deduction a b = -a = -b, but that isn't the case. Instead it lets you make the