Re: ICU integration

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ICU integration
Date: 2017-01-15 10:53:56
Message-ID: CAFj8pRAxMEUXcQoihYMWP8t6EfaKSZB3njJom9eAZT=EA54LMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2016-12-28 3:50 GMT+01:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com
>:

> Updated patch attached.
>
> The previous round of reviews showed that there was general agreement on
> the approach. So I have focused on filling in the gaps, added ICU
> support to all the locale-using places, added documentation, fixed some
> minor issues that have been pointed out. Everything appears to work
> correctly now, and the user-facing feature set is pretty well-rounded.
>
> I don't have much experience with the abbreviated key stuff. I have
> filled in what I think should work, but it needs detailed review.
>
> Similarly, some of the stuff in the regular expression code was hacked
> in blindly.
>
> One minor problem is that we now support adding any-encoding collation
> entries, which violates some of the comments in CollationCreate(). See
> FIXME there. It doesn't seem worth major contortions to fix that; maybe
> it just has to be documented better.
>

the regress test fails

Program received signal SIGSEGV, Segmentation fault.
0x00000000007bbc2b in pattern_char_isalpha (locale_is_c=0 '\000',
locale=0x1a73220, is_multibyte=1 '\001', c=97 'a') at selfuncs.c:5291
5291 return isalpha_l((unsigned char) c, locale->lt);

(gdb) bt
#0 0x00000000007bbc2b in pattern_char_isalpha (locale_is_c=0 '\000',
locale=0x1a73220, is_multibyte=1 '\001', c=97 'a') at selfuncs.c:5291
#1 like_fixed_prefix (patt_const=<optimized out>,
case_insensitive=<optimized out>, collation=<optimized out>,
prefix_const=0x7ffc0963e800,
rest_selec=0x7ffc0963e808) at selfuncs.c:5389
#2 0x00000000007c1076 in patternsel (fcinfo=<optimized out>,
ptype=ptype(at)entry=Pattern_Type_Like_IC, negate=negate(at)entry=0 '\000')
at selfuncs.c:1228
#3 0x00000000007c1680 in iclikesel (fcinfo=<optimized out>) at
selfuncs.c:1406
#4 0x000000000080db56 in OidFunctionCall4Coll (functionId=<optimized out>,
collation=collation(at)entry=12886, arg1=arg1(at)entry=28299032,
arg2=arg2(at)entry=1627, arg3=arg3(at)entry=28300096, arg4=arg4(at)entry=0) at
fmgr.c:1674
#5 0x000000000068e424 in restriction_selectivity (root=root(at)entry=0x1afcf18,
operatorid=1627, args=0x1afd340, inputcollid=12886,
varRelid=varRelid(at)entry=0) at plancat.c:1583
#6 0x000000000065457e in clause_selectivity (root=0x1afcf18,
clause=<optimized out>, varRelid=0, jointype=JOIN_INNER, sjinfo=0x0)
at clausesel.c:657
#7 0x000000000065485c in clauselist_selectivity (root=root(at)entry=0x1afcf18,
clauses=<optimized out>, varRelid=varRelid(at)entry=0,
jointype=jointype(at)entry=JOIN_INNER, sjinfo=sjinfo(at)entry=0x0) at
clausesel.c:107
#8 0x00000000006599d4 in set_baserel_size_estimates
(root=root(at)entry=0x1afcf18,
rel=rel(at)entry=0x1afd500) at costsize.c:3771
#9 0x00000000006526e5 in set_plain_rel_size (rte=<optimized out>,
rel=<optimized out>, root=<optimized out>) at allpaths.c:492
#10 set_rel_size (root=root(at)entry=0x1afcf18, rel=rel(at)entry=0x1afd500,
rti=rti(at)entry=1, rte=0x1acfb68) at allpaths.c:352
#11 0x0000000000653ebd in set_base_rel_sizes (root=<optimized out>) at
allpaths.c:272
#12 make_one_rel (root=root(at)entry=0x1afcf18, joinlist=joinlist(at)entry=0x1afd810)
at allpaths.c:170
#13 0x0000000000670ad4 in query_planner (root=root(at)entry=0x1afcf18,
tlist=tlist(at)entry=0x1afd1b0,
qp_callback=qp_callback(at)entry=0x6710c0 <standard_qp_callback>,
qp_extra=qp_extra(at)entry=0x7ffc0963f020) at planmain.c:254
#14 0x00000000006727cc in grouping_planner (root=root(at)entry=0x1afcf18,
inheritance_update=inheritance_update(at)entry=0 '\000',
tuple_fraction=<optimized out>, tuple_fraction(at)entry=0) at
planner.c:1729
#15 0x00000000006752c6 in subquery_planner (glob=glob(at)entry=0x1afcbe8,
parse=parse(at)entry=0x1acfa50, parent_root=parent_root(at)entry=0x0,
hasRecursion=hasRecursion(at)entry=0 '\000',
tuple_fraction=tuple_fraction(at)entry=0) at planner.c:789
#16 0x000000000067619f in standard_planner (parse=0x1acfa50,
cursorOptions=256, boundParams=0x0) at planner.c:301
#17 0x00000000007095bd in pg_plan_query (querytree=0x1acfa50,
cursorOptions=256, boundParams=0x0) at postgres.c:798
#18 0x000000000070968e in pg_plan_queries (querytrees=<optimized out>,
cursorOptions=cursorOptions(at)entry=256, boundParams=boundParams(at)entry=0x0)
at postgres.c:864
#19 0x000000000070b1e7 in exec_simple_query (query_string=0x1ace8c8 "SELECT
* FROM collate_test1 WHERE b ILIKE 'abc';") at postgres.c:1029
#20 PostgresMain (argc=<optimized out>, argv=argv(at)entry=0x1a78988,
dbname=<optimized out>, username=<optimized out>) at postgres.c:4067
#21 0x000000000046fc7d in BackendRun (port=0x1a6e6e0) at postmaster.c:4300
#22 BackendStartup (port=0x1a6e6e0) at postmaster.c:3972

[root(at)localhost backend]# dnf info libicu
Last metadata expiration check: 1:50:20 ago on Sun Jan 15 09:58:29 2017.
Installed Packages
Name : libicu
Arch : x86_64
Epoch : 0
Version : 57.1
Release : 4.fc25
Size : 29 M
Repo : @System

Regards

Pavel

> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karl O. Pinc 2017-01-15 13:20:40 Re: Patch to implement pg_current_logfile() function
Previous Message Gilles Darold 2017-01-15 10:11:44 Re: Patch to implement pg_current_logfile() function