Annie,
> Well, I am not familiar with functions, Do they have better
> performance than the plain query as the following?
>
> select * from table where Firstname like 'blah' or middlename like
> 'blah'....
The problem with the approach above is that it allows you to find"Annie" or "Bai" but not "Annie Bai". The
concatinationapproach,while slower to execute, allows you to search on any combination. Youwill also want to
investigatePostgreSQL Regex comparisons so that youcan do case-insensitive similarity matching.
Overall, though, you need to build your basic database design knowledgebefore going further on this project. I'd
recommend"Database DesignFor Mere Mortals.", followed by any number of introdcutory texts onPostgresql. See
http://techdocs.postgresql.org/bookreviews.php
Finally, your questions are more appropriate to the NOVICE list; wouldyou be kind enough to post them there, instead?
TheSQL list is morefor advanced SQL questions (and I answer questions on both lists!).
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete
informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small
businesses fax 621-2533 and non-profit organizations. San Francisco