On Thursday 14 April 2011 23:10:41 Tom Lane wrote: > Noah Misch <n...@leadboat.com> writes: > > On Thu, Apr 14, 2011 at 11:15:00AM -0700, Robert Haas wrote: > >> It shouldn't be > >> terribly difficult to come up with some kind of hash function based > >> on, say, the first two characters of the keyword that would be a lot > >> faster than what we're doing now. > > > > I'd look at `gperf', which generates code for this from your keyword > > list. > > FWIW, mysql used to use gperf for this purpose, but they've abandoned it > in favor of some homegrown hashing scheme. I don't know exactly why, > but I wonder if it was for licensing reasons. gperf itself is GPL, and > I don't see any disclaimer in the docs saying that its output isn't. http://lists.gnu.org/archive/html/bug-gnu-utils/2008-08/msg00005.html :
> Thanks for the suggestion; it indeed becomes sort of an FAQ. I've added > > this text to the documentation: > gperf is under GPL, but that does not cause the output produced > by gperf to be under GPL. The reason is that the output contains > only small pieces of text that come directly from gperf's source > code -- only about 7 lines long, too small for being significant --, > and therefore the output is not a "derivative work" of gperf (in the > sense of U.S.@: copyright law). Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers