Re: full text search in 8.3 - Mailing list pgsql-hackers

From andy
Subject Re: full text search in 8.3
Date
Msg-id 470E7033.7040402@squeakycode.net
Whole thread Raw
In response to Re: full text search in 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> andy <andy@squeakycode.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@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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: full text search in 8.3
Next
From: Tom Lane
Date:
Subject: Re: Timezone database changes