Re: Simplifying Text Search - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Simplifying Text Search
Date
Msg-id 1194898188.2644.211.camel@ebony.site
Whole thread Raw
In response to Re: Simplifying Text Search  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Simplifying Text Search  (Heikki Linnakangas <heikki@enterprisedb.com>)
Re: Simplifying Text Search  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: Simplifying Text Search  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: Simplifying Text Search  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Mon, 2007-11-12 at 11:56 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > So we end up with a normal sounding function that is overloaded to
> > provide all of the various goodies.
> 
> As best I can tell, @@ does exactly this already.  This is just a
> different spelling of the same capability, and I don't actually
> find it better.  Why is "text_search(x,y)" better than "x @@ y"?
> We don't recommend that people write "texteq(x,y)" instead of
> "x = y".

Most people don't understand those differences. x = y means "make sure
they are the same" to most people. They don't see what you (and I) see:
function and operator interchangeability. So text_search() is better
than @@ and = is better than texteq(). Life ain't neat...

Right now, Full Text Search SQL looks like complete gibberish and it
dissuades many people from using what is an awesome set of features. I
just want to add a little sugar to help people get started.

> > Sound good?
> 
> It's not an improvement

That is the very point of debate

> it's not compatible with what existing tsearch2
> users are accustomed to

@@ would still exist, so no problems. These additions are for new users,
not old ones.

> it's several months too late...

True. I wish I'd thought of it before. I've waded through the syntax
without thinking how to make it more easily readable and explainable.
Damn.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Proposal: Select ... AS OF Savepoint
Next
From: Heikki Linnakangas
Date:
Subject: Re: Simplifying Text Search