On Mon, Oct 3, 2011 at 2:13 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, Sep 29, 2011 at 6:24 AM, Kyotaro HORIGUCHI > <horiguchi.kyot...@oss.ntt.co.jp> wrote: >> This is new version of make_greater_string patch. > > According to the comments in the original source code, the purpose of > savelastchar is to avoid confusing pg_mbcliplen(). You've preserved > savelastchar only for the case where datatype == BYTEAOID, while > making it the increment function's job not to do anything permanent > unless it also returns true. But it seems to me that if the datatype > is BYTEAOID then there's no need to restore anything at all, because > we're not going to call pg_mbcliplen() in that case anyway. So I > think the logic here can be simplified. > > Also, you haven't completely fixed the style issues. Function > definitions should look like this: > > static void > thingy() > { > } > > Not like this: > > static void thingy() > { > } > > Opening curly braces should be on a line by themselves, not at the end > of the preceding if, while, etc. line. > > "finnaly" is spelled incorrectly.
Oh, and there's this: wchar.c: In function ‘pg_utf8_increment’: wchar.c:1376: warning: unused variable ‘success’ wchar.c: In function ‘pg_eucjp_increment’: wchar.c:1433: warning: unused variable ‘success’ -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers