Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: PATCH: CITE...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 15 Topic 9610 of 11013
Post > Topic >>

Re: PATCH: CITEXT 2.0

by Zdenek.Kotala@[EMAIL PROTECTED] (Zdenek Kotala) Jul 2, 2008 at 06:13 PM

David E. Wheeler napsal(a):
> Howdy,

Howdy

> Please find attached a patch adding a locale-aware, case-insensitive 
> text type, called citext, as a contrib module. A few notes:

I went through your code and I have following comments/questions:

1) formating

Please, do not type space before asterix:
  char * lcstr, * rcstr -> char *lcstr, *rcstr

and do not put extra space in a brackets
citextcmp( left, right )  -> citextcmp(left, right)

Other seems to me OK (remove 8.2 version mention at the bottom)

2) citextcmp function returns int but citext_cmp returns int32. I think 
citextcmp should returns int32 as well.

3) citext_larger, citext_smaller function have memory leak. You don't call

PG_FREE_IF_COPY on unused text.

I'm not sure if return value in these function should be duplicated or
not.

4) Operator =  citext_eq is not correct. See comment 
http://doxygen.postgresql.org/varlena_8c.html#8621d064d14f259c594e4df3c1a64cac

There must be difference between equality and collation for example in
Czech 
language 'láska' and 'laská' are different word it means that 'láska'
!= 
'laská'. But there is no difference in collation order. See Unicode
Universal 
Collation Algorithm for detail.

5) There are several commented out lines in CREATE OPERATOR statement
mostly 
related to NEGATOR. Is there some reason for that? Also OPERATOR || has
probably 
wrong negator.


6) You use pgTAP for unit test. It is something what should be widely
discussed. 
  It is new approach and I'm not correct person to say if it good or not.

I see there two problems:
At first point there is not clear licensing 
(https://svn.kineticode.com/pgtap/trunk/README.pgtap).
And, It should be implemented as a general framework by my opinion not
only as a 
part of citext contrib module.

Please, let me know when you will have updated code and I will start deep
testing.

		With regards Zdenek




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 15 Posts in Topic:
Re: PATCH: CITEXT 2.0
Zdenek.Kotala@[EMAIL PROT  2008-07-02 18:13:52 
Re: PATCH: CITEXT 2.0
teodor@[EMAIL PROTECTED]   2008-07-02 23:18:49 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-02 21:40:12 
Re: PATCH: CITEXT 2.0
teodor@[EMAIL PROTECTED]   2008-07-03 11:19:26 
Re: PATCH: CITEXT 2.0
teodor@[EMAIL PROTECTED]   2008-07-03 11:31:06 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-03 09:03:10 
Re: PATCH: CITEXT 2.0
alvherre@[EMAIL PROTECTED  2008-07-03 12:53:15 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-04 22:39:54 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-02 21:38:32 
Re: PATCH: CITEXT 2.0
tgl@[EMAIL PROTECTED] (T  2008-07-03 01:14:14 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-03 09:01:17 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-04 22:54:45 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-04 23:06:36 
Re: PATCH: CITEXT 2.0
tgl@[EMAIL PROTECTED] (T  2008-07-05 11:13:20 
Re: PATCH: CITEXT 2.0
david@[EMAIL PROTECTED]   2008-07-05 17:47:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 9:02:17 CST 2008.