Unix Technical Forum

Drop separate CRC32 implementations in ltree, tsearch, tsearch2?

This is a discussion on Drop separate CRC32 implementations in ltree, tsearch, tsearch2? within the pgsql Hackers forums, part of the PostgreSQL category; --> contrib/ltree, contrib/tsearch, and contrib/tsearch2 each contain implementations of CRC32 calculations. I think these are now pretty redundant with the ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 05:11 AM
Tom Lane
 
Posts: n/a
Default Drop separate CRC32 implementations in ltree, tsearch, tsearch2?

contrib/ltree, contrib/tsearch, and contrib/tsearch2 each contain
implementations of CRC32 calculations. I think these are now pretty
redundant with the CRC32 code existing in the main backend. They
use a different CRC polynomial than the main backend code does,
but it's hard to credit that that is an important difference.
Anyone see a reason not to rip that code out and make these modules
use pg_crc.h/pg_crc.c instead?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 05:11 AM
Teodor Sigaev
 
Posts: n/a
Default Re: Drop separate CRC32 implementations in ltree, tsearch,

> contrib/ltree, contrib/tsearch, and contrib/tsearch2 each contain
> implementations of CRC32 calculations. I think these are now pretty
> redundant with the CRC32 code existing in the main backend. They
> use a different CRC polynomial than the main backend code does,
> but it's hard to credit that that is an important difference.

I think no matter. Although we had experiment to choice the best hash function
and choose crc32. Other functions make much more collisions on non-engish words.


> Anyone see a reason not to rip that code out and make these modules
> use pg_crc.h/pg_crc.c instead?


contrib/tsearch is already marked as obsolete, and I think that we can remove it
away from contrib. BTW, ltree/crc32.c and tsearch2/crc32.c has small
difference: ltree variant may lower string (depend of LOWER_NODE define) before
calculation checksum.
But pg_crc counts 64-bit checksum while contrib modules needs 32. Will be
correct to use only half-value? I am afraid number of collisions will be more...



--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com