Re: full text search in 8.3

From: andy <andy(at)squeakycode(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: full text search in 8.3
Date: 2007-10-11 18:49:23
Message-ID: 470E7033.7040402@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> andy <andy(at)squeakycode(dot)net> writes:
>> the operator = is not the 'normal =' is it? Its the 'tsearch2 =', right?
>
> That one probably is, but how is your sed script going to distinguish it
> from other user-defined '=' operators that might be in the dump?
>
>> Do I need to worry about sed with window's users?
>
> I think sed is available but not normally installed on Windows.
> Unfortunately the same could be said of any other tool you might choose,
> so that's probably not a reason not to use it.
>
> regards, tom lane

Oh man... Ok, do you want to go as far as extracting just one operator,
and pulling out its PROCEDURE name?

For one of the ='s, I put just its line to the file x:

1122; 2617 98020 OPERATOR public = andy

Then ran:
andy(at)slacker:/pub/back$ pg_restore -Fc -L x vcstimes.bak
--
-- PostgreSQL database dump
--

SET client_encoding = 'LATIN1';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

--
-- Name: =; Type: OPERATOR; Schema: public; Owner: andy
--

CREATE OPERATOR = (
PROCEDURE = tsquery_eq,
LEFTARG = tsquery,
RIGHTARG = tsquery,
COMMUTATOR = =,
NEGATOR = <>,
MERGES,
RESTRICT = eqsel,
JOIN = eqjoinsel
);

ALTER OPERATOR public.= (tsquery, tsquery) OWNER TO andy;

--
-- PostgreSQL database dump complete
--

I could grep out the PROCEDURE line and see if it looks tsearch2'ish.
If you want to go that route, its starting to sound beyond sed, would
perl be ok?

-Andy

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-10-11 18:57:40 Re: Timezone database changes
Previous Message Tom Lane 2007-10-11 18:40:02 Re: full text search in 8.3