Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Robert Haas
On Wed, Feb 1, 2012 at 10:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Is spgist intended to support prefix searches with LIKE? Too lazy to look at the code right now, but I think indxpath.c contains hardwired assumptions that LIKE prefix optimizations

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Feb 1, 2012 at 10:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: Too lazy to look at the code right now, but I think indxpath.c contains hardwired assumptions that LIKE prefix optimizations are only possible with btree indexes. Possibly it would be

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Robert Haas
On Thu, Feb 2, 2012 at 12:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Feb 1, 2012 at 10:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: Too lazy to look at the code right now, but I think indxpath.c contains hardwired assumptions that LIKE prefix

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I'm having trouble figuring out under what set of circumstances spgist is expected to be the best available alternative. It only supports a small subset of the data types that GiST does, so I suppose the point is that it should be faster for the cases

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Alexander Korotkov
On Thu, Feb 2, 2012 at 10:21 PM, Robert Haas robertmh...@gmail.com wrote: I'm having trouble figuring out under what set of circumstances spgist is expected to be the best available alternative. It only supports a small subset of the data types that GiST does, so I suppose the point is that

[HACKERS] spgist text_ops and LIKE

2012-02-01 Thread Robert Haas
Is spgist intended to support prefix searches with LIKE? I ask because, first, it seems like something spgist ought to be good at (unless I'm confused), and, second, the text_ops opfamily includes these operators: ~~(text,text) ~=~(text,text) ~=~(text,text) ~~(text,text) ...which seems to be

Re: [HACKERS] spgist text_ops and LIKE

2012-02-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Is spgist intended to support prefix searches with LIKE? Too lazy to look at the code right now, but I think indxpath.c contains hardwired assumptions that LIKE prefix optimizations are only possible with btree indexes. Possibly it would be worth