Re: problems with table corruption continued - Mailing list pgsql-hackers

From Tom Lane
Subject Re: problems with table corruption continued
Date
Msg-id 17805.1008703200@sss.pgh.pa.us
Whole thread Raw
In response to Re: problems with table corruption continued  ("Brian Hirt" <bhirt@mobygames.com>)
List pgsql-hackers
"Brian Hirt" <bhirt@mobygames.com> writes:
> I was trying to avoid adding additional computed fields to the tables and
> maintaining them with triggers, indexing and searching on them.  The index
> function seemed like an elegant solution to the problem

Understood, but can you write the index function in a way that avoids
having it do a SELECT to get at data that it hasn't been passed?  I'm
wondering if you can't define the function as justf(first_name, last_name) = upper(first_name || ' ' || last_name)
and create the index on f(first_name, last_name).  You haven't shown us
the queries you expect the index to be helpful for, so maybe this is not
workable...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: Re: problems with table corruption continued
Next
From: Tom Lane
Date:
Subject: Re: problems with table corruption continued