From: | "Ian Harding" <harding(dot)ian(at)gmail(dot)com> |
---|---|
To: | Chris <dmagick(at)gmail(dot)com> |
Cc: | "Toby Tremayne" <toby(at)lyricist(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: indexes across multiple tables |
Date: | 2007-02-20 14:51:47 |
Message-ID: | 725602300702200651h51d76920w64d54733f65d697e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2/18/07, Chris <dmagick(at)gmail(dot)com> wrote:
> Toby Tremayne wrote:
> > Hi all,
> >
> > I'm just experimenting with tsearch2 - I have it all working fine but I
> > was wondering if there's a way to create indexes containing vector
> > columns from multiple tables? Or if not, how do people usually manage
> > this kind of issue?
>
> Postgres doesn't support multi-table indexes so there's no way tsearch2
> would be able to.
>
> What exactly are you trying to achieve?
>
> --
Probably best to join the tables, then simply do the search in the
WHERE clause. Something like
select p.partname, s.subassemblyname
from part p join subassembly s
on p.partid = s.partid
where p.partidx @@ to_tsquery('Some happy string')
or s.subidx @@ to_tsquery('Some happy string')
That's how I do it, anyway...
- Ian
From | Date | Subject | |
---|---|---|---|
Next Message | Marek Lewczuk | 2007-02-20 14:55:59 | Warning "TupleDesc reference leak" |
Previous Message | Bruce Momjian | 2007-02-20 14:49:00 | Re: Password issue revisited |