From marco.atzeri@gmail.com Sat Jan 25 06:51:12 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6x5D-0008V3-QZ for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 06:51:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6x5C-0008Eg-6w for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 06:51:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6x5B-0008ED-4Y for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 06:51:09 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6x55-0005rr-67 for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 06:51:08 +0000 MIME-Version: 1.0 Subject: BUG #8970: ts_parse incorrectly split numbers in digit token To: pgsql-bugs@postgresql.org From: marco.atzeri@gmail.com Date: Sat, 25 Jan 2014 06:50:24 +0000 Message-ID: <20140125065024.26700.13481@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8970 Logged by: Marco Atzeri Email address: marco.atzeri@gmail.com PostgreSQL version: 9.3.2 Operating system: Cygwin Description: Extract from failure comparison. ===================================== --- /pub/devel/postgresql/postgresql-9.3.2-1/src/postgresql-9.3.2/src/test/regress/expected/tsearch.out 2013-12-02 21:57:48.000000000 +0100 +++ /pub/devel/postgresql/postgresql-9.3.2-1/build/src/test/regress/results/tsearch.out 2014-01-24 19:36:27.625466800 +0100 @@ -267,10 +267,11 @@ SELECT * FROM ts_parse('default', '345 qwe@efd.r '' http://www.com/ http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 5.005 teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> ewri2 /usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234 wow < jqw <> qwerty'); - tokid | token --------+-------------------------------------- - 22 | 345 - 12 | + tokid | token +-------+------------------------- + 12 | 3 + 12 | 4 + 12 | 5 1 | qwe 12 | @ 19 | efd.r @@ -283,53 +284,97 @@ 6 | aew.werc.ewr 18 | /?ad=qwe&dw 12 | - 5 | 1aew.werc.ewr/?ad=qwe&dw - 6 | 1aew.werc.ewr + 12 | 1 + 5 | aew.werc.ewr/?ad=qwe&dw + 6 | aew.werc.ewr 18 | /?ad=qwe&dw ======================================= current build dependecy bash-4.1.10-4 crypt-1.2-1 cygwin-1.7.27-2 gettext-0.18.1.1-2 libgcc1-4.8.2-2 libintl8-0.18.1.1-2 libopenldap2_4_2-2.4.35-2 libopenssl100-1.0.1f-1 libreadline7-6.1.2-3 openldap-devel-2.4.35-2 openssl-devel-1.0.1f-1 perl-5.14.2-3 python-2.7.3-1 zlib0-1.2.8-1 #################################### extracts from config.log /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/configure --srcdir=/pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/postgresql --htmldir=/usr/share/doc/postgresql/html -C LDFLAGS=-Wl,-no-undefined --enable-nls --with-openssl --with-perl --with-python --with-ldap [cut] ## ----------- ## ## confdefs.h. ## ## ----------- ## #define PACKAGE_NAME "PostgreSQL" #define PACKAGE_TARNAME "postgresql" #define PACKAGE_VERSION "9.3.2" #define PACKAGE_STRING "PostgreSQL 9.3.2" #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" #define PG_VERSION "9.3.2" #define PG_MAJORVERSION "9.3" #define USE_INTEGER_DATETIMES 1 #define ENABLE_NLS 1 #define DEF_PGPORT 5432 #define DEF_PGPORT_STR "5432" #define BLCKSZ 8192 #define RELSEG_SIZE 131072 #define XLOG_BLCKSZ 8192 #define XLOG_SEG_SIZE (16 * 1024 * 1024) #define ENABLE_THREAD_SAFETY 1 #define PG_KRB_SRVNAM "postgres" #define USE_LDAP 1 #define USE_SSL 1 #define HAVE_LIBM 1 #define HAVE_LIBREADLINE 1 #define HAVE_LIBZ 1 #define HAVE_SPINLOCKS 1 #define HAVE_LIBCRYPTO 1 #define HAVE_LIBSSL 1 #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_CRYPT_H 1 #define HAVE_GETOPT_H 1 #define HAVE_IEEEFP_H 1 #define HAVE_IFADDRS_H 1 #define HAVE_LANGINFO_H 1 #define HAVE_POLL_H 1 #define HAVE_PWD_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_IPC_H 1 #define HAVE_SYS_POLL_H 1 #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_SEM_H 1 #define HAVE_SYS_SHM_H 1 #define HAVE_SYS_SOCKET_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_UN_H 1 #define HAVE_TERMIOS_H 1 #define HAVE_UTIME_H 1 #define HAVE_WCHAR_H 1 #define HAVE_WCTYPE_H 1 #define HAVE_NET_IF_H 1 #define HAVE_NETINET_IN_H 1 #define HAVE_NETINET_TCP_H 1 #define HAVE_READLINE_READLINE_H 1 #define HAVE_READLINE_HISTORY_H 1 #define HAVE_LDAP_H 1 #define PG_USE_INLINE 1 #define HAVE_STRINGIZE 1 #define FLEXIBLE_ARRAY_MEMBER /**/ #define HAVE_FUNCNAME__FUNC 1 #define HAVE__STATIC_ASSERT 1 #define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 #define HAVE__BUILTIN_CONSTANT_P 1 #define HAVE__BUILTIN_UNREACHABLE 1 #define HAVE__VA_ARGS 1 #define HAVE_TZNAME 1 #define HAVE_UNIX_SOCKETS 1 #define HAVE_STRUCT_SOCKADDR_STORAGE 1 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 #define HAVE_STRUCT_ADDRINFO 1 #define HAVE_INTPTR_T 1 #define HAVE_UINTPTR_T 1 #define HAVE_LONG_LONG_INT 1 #define HAVE_STRUCT_OPTION 1 #define SIZEOF_OFF_T 8 #define HAVE_INT_TIMEZONE /**/ #define ACCEPT_TYPE_RETURN int #define ACCEPT_TYPE_ARG1 int #define ACCEPT_TYPE_ARG2 struct sockaddr * #define ACCEPT_TYPE_ARG3 int #define HAVE_CBRT 1 #define HAVE_DLOPEN 1 #define HAVE_FDATASYNC 1 #define HAVE_GETIFADDRS 1 #define HAVE_GETRLIMIT 1 #define HAVE_MEMMOVE 1 #define HAVE_POLL 1 #define HAVE_READLINK 1 #define HAVE_SETSID 1 #define HAVE_SIGPROCMASK 1 #define HAVE_SYMLINK 1 #define HAVE_TOWLOWER 1 #define HAVE_UTIME 1 #define HAVE_UTIMES 1 #define HAVE_WCSTOMBS 1 #define HAVE_FSEEKO 1 #define HAVE_FSEEKO 1 #define HAVE_POSIX_FADVISE 1 #define HAVE_DECL_POSIX_FADVISE 1 #define HAVE_DECL_FDATASYNC 1 #define HAVE_DECL_STRLCAT 1 #define HAVE_DECL_STRLCPY 1 #define HAVE_DECL_F_FULLFSYNC 0 #define HAVE_IPV6 1 #define HAVE_SNPRINTF 1 #define HAVE_VSNPRINTF 1 #define HAVE_DECL_SNPRINTF 1 #define HAVE_DECL_VSNPRINTF 1 #define HAVE_ISINF 1 #define HAVE_CRYPT 1 #define HAVE_GETOPT 1 #define HAVE_GETRUSAGE 1 #define HAVE_INET_ATON 1 #define HAVE_RANDOM 1 #define HAVE_RINT 1 #define HAVE_SRANDOM 1 #define HAVE_STRERROR 1 #define HAVE_STRLCAT 1 #define HAVE_STRLCPY 1 #define HAVE_UNSETENV 1 #define HAVE_GETPEEREID 1 #define HAVE_GETADDRINFO 1 #define HAVE_GETOPT_LONG 1 #define HAVE_SIGSETJMP 1 #define HAVE_DECL_SYS_SIGLIST 1 #define HAVE_SYSLOG 1 #define HAVE_INT_OPTERR 1 #define HAVE_INT_OPTRESET 1 #define HAVE_STRTOLL 1 #define HAVE_STRTOULL 1 #define HAVE_GCC_INT_ATOMICS 1 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1 #define HAVE_RL_COMPLETION_MATCHES 1 #define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1 #define HAVE_APPEND_HISTORY 1 #define HAVE_HISTORY_TRUNCATE_FILE 1 #define HAVE_STRERROR_R 1 #define HAVE_GETPWUID_R 1 #define GETPWUID_R_5ARG /**/ #define STRERROR_R_INT /**/ #define HAVE_LIBLDAP 1 #define HAVE_LIBLDAP_R 1 #define HAVE_LONG_LONG_INT_64 1 #define PG_INT64_TYPE long long int #define HAVE_LL_CONSTANTS 1 #define INT64_FORMAT "%lld" #define UINT64_FORMAT "%llu" #define SIZEOF_VOID_P 4 #define SIZEOF_SIZE_T 4 #define SIZEOF_LONG 4 #define USE_FLOAT4_BYVAL 1 #define FLOAT4PASSBYVAL true #define FLOAT8PASSBYVAL false #define ALIGNOF_SHORT 2 #define ALIGNOF_INT 4 #define ALIGNOF_LONG 4 #define ALIGNOF_LONG_LONG_INT 8 #define ALIGNOF_DOUBLE 8 #define MAXIMUM_ALIGNOF 8 #define HAVE_SIG_ATOMIC_T 1 #define HAVE_POSIX_SIGNALS /**/ #define USE_SYSV_SEMAPHORES 1 #define USE_SYSV_SHARED_MEMORY 1 #define MEMSET_LOOP_LIMIT 1024 #define PG_VERSION_STR "PostgreSQL 9.3.2 on i686-pc-cygwin, compiled by gcc (GCC) 4.8.2, 32-bit" #define PG_VERSION_NUM 90302 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From bruce@momjian.us Sat Jan 25 15:40:04 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W75L2-0001Vv-GV for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 15:40:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W75L2-00065n-0H for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 15:40:04 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W75L0-00065g-VQ for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 15:40:03 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W75Ks-0002YE-P8 for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 15:40:02 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1W75Kr-0002sS-QE; Sat, 25 Jan 2014 10:39:53 -0500 Date: Sat, 25 Jan 2014 10:39:53 -0500 From: Bruce Momjian To: marco.atzeri@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token Message-ID: <20140125153953.GC17657@momjian.us> References: <20140125065024.26700.13481@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140125065024.26700.13481@wrigleys.postgresql.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Sat, Jan 25, 2014 at 06:50:24AM +0000, marco.atzeri@gmail.com wrote: > The following bug has been logged on the website: > > Bug reference: 8970 > Logged by: Marco Atzeri > Email address: marco.atzeri@gmail.com > PostgreSQL version: 9.3.2 > Operating system: Cygwin > Description: > > Extract from failure comparison. > > ===================================== > --- > /pub/devel/postgresql/postgresql-9.3.2-1/src/postgresql-9.3.2/src/test/regress/expected/tsearch.out > 2013-12-02 21:57:48.000000000 +0100 > +++ > /pub/devel/postgresql/postgresql-9.3.2-1/build/src/test/regress/results/tsearch.out > 2014-01-24 19:36:27.625466800 +0100 > @@ -267,10 +267,11 @@ > SELECT * FROM ts_parse('default', '345 qwe@efd.r '' http://www.com/ > http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr > http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr > http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw > 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 > 5.005 teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> > ewri2 > /usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c > gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234 > wow < jqw <> qwerty'); > - tokid | token > --------+-------------------------------------- > - 22 | 345 > - 12 | > + tokid | token > +-------+------------------------- > + 12 | 3 > + 12 | 4 > + 12 | 5 Uh, there are some known problems with Cygwin, particularly with text search. I don't think anyone knows the cause, but I think it is problem in the Cygwin platform. Here is a thread that mentions the issue: http://www.postgresql.org/message-id/51B59794.3000500@gmail.com and here is a comment about the failures: http://www.postgresql.org/message-id/52E1EBD0.4090304@dunslane.net AFAICT the regression is in Cygwin. The buildfarm passes because it's using an oldish Cygwin release, 1.7.7 rather than the current 1.7.27. I have brought the regression the athe attention of the Cygwin people in the past, but without response. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From bruce@momjian.us Sat Jan 25 15:43:43 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W75OZ-0001fI-Kh for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 15:43:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W75OZ-0006yn-5A for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 15:43:43 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W75OY-0006yh-D6 for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 15:43:42 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W75OS-0002da-Ch for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 15:43:41 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1W75OR-00030i-SA; Sat, 25 Jan 2014 10:43:35 -0500 Date: Sat, 25 Jan 2014 10:43:35 -0500 From: Bruce Momjian To: marco.atzeri@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token Message-ID: <20140125154335.GD17657@momjian.us> References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140125153953.GC17657@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140125153953.GC17657@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Sat, Jan 25, 2014 at 10:39:53AM -0500, Bruce Momjian wrote: > Uh, there are some known problems with Cygwin, particularly with text > search. I don't think anyone knows the cause, but I think it is problem > in the Cygwin platform. > > Here is a thread that mentions the issue: > > http://www.postgresql.org/message-id/51B59794.3000500@gmail.com > > and here is a comment about the failures: > > http://www.postgresql.org/message-id/52E1EBD0.4090304@dunslane.net > > AFAICT the regression is in Cygwin. The buildfarm passes because it's > using an oldish Cygwin release, 1.7.7 rather than the current 1.7.27. I > have brought the regression the athe attention of the Cygwin people in > the past, but without response. Oops, I just replied to you with your own thread. :-) I thought it was odd we had all these Cygwin reports all of a sudden. LOL Anyway, are you saying these are not platform bugs as Andrew suggested? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From marco.atzeri@gmail.com Sat Jan 25 20:29:34 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W79rC-0003JR-Bu for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 20:29:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W79rA-0008Rw-S9 for pgsql-bugs@arkaria.postgresql.org; Sat, 25 Jan 2014 20:29:32 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W79r9-0008Rq-Up for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 20:29:32 +0000 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W79r6-0007ZA-J0 for pgsql-bugs@postgresql.org; Sat, 25 Jan 2014 20:29:30 +0000 Received: by mail-ee0-f45.google.com with SMTP id b15so1538096eek.18 for ; Sat, 25 Jan 2014 12:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=qtEmx8qGgTHj0m1E3QCvddptLLDR8BOmhiQLtnKo960=; b=yogV5Pp1nWlfW8mgP/EBh09KAqwYJVXe6kJc7sAuPiR92D/ePTXogNI9O36bexfyZg fCIW70A2yeIQnDmauM/nyevt4d906Cf4qoDy1s7+zwyln3ayWOJHC0QpSrXvLy8iWjNG +3b+ghKBhtxj2ShwEXik7o3hKRuqmFk4/TsTN2nmT8vM2j2wMStL2BnDh8r4+B3W6ZGG ykqCVuN4iI0x4+ZyAANNQo6qF8YMbz3UpAUoNKvIuNpNcPr028hOLC+aYsr9UKjIn4vt Mrspj3ZITRJDsBheuEObcw0XSDt09NwHECCzPTlPfXiLQeOqVmPrJVrSKUXVkRCNf4lJ AO3g== X-Received: by 10.14.103.194 with SMTP id f42mr18516280eeg.15.1390681767445; Sat, 25 Jan 2014 12:29:27 -0800 (PST) Received: from [192.168.1.3] (ppp-170-245.32-151.iol.it. [151.32.245.170]) by mx.google.com with ESMTPSA id v1sm20022105eef.9.2014.01.25.12.29.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 25 Jan 2014 12:29:26 -0800 (PST) Message-ID: <52E41EA2.8010507@gmail.com> Date: Sat, 25 Jan 2014 21:29:22 +0100 From: Marco Atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Bruce Momjian CC: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140125153953.GC17657@momjian.us> <20140125154335.GD17657@momjian.us> In-Reply-To: <20140125154335.GD17657@momjian.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 25/01/2014 16:43, Bruce Momjian wrote: > On Sat, Jan 25, 2014 at 10:39:53AM -0500, Bruce Momjian wrote: >> Uh, there are some known problems with Cygwin, particularly with text >> search. I don't think anyone knows the cause, but I think it is problem >> in the Cygwin platform. >> >> Here is a thread that mentions the issue: >> >> http://www.postgresql.org/message-id/51B59794.3000500@gmail.com >> >> and here is a comment about the failures: >> >> http://www.postgresql.org/message-id/52E1EBD0.4090304@dunslane.net >> >> AFAICT the regression is in Cygwin. The buildfarm passes because it's >> using an oldish Cygwin release, 1.7.7 rather than the current 1.7.27. I >> have brought the regression the athe attention of the Cygwin people in >> the past, but without response. Bruce, I took over, the binary package responsabilities, in Jan 2013 with 9.2.2 http://cygwin.com/ml/cygwin-announce/2013-01/msg00032.html Before that the previous package releasse was 8.2.11 http://cygwin.com/ml/cygwin-announce/2009-01/msg00010.html Can we move forward ? Testing on 1.7.7 will not help me on packaging a full functional binary deployed through our setup as our users expect. > Oops, I just replied to you with your own thread. :-) I thought it was > odd we had all these Cygwin reports all of a sudden. LOL Always me ;-) > Anyway, are you saying these are not platform bugs as Andrew suggested? what do you you mean as platform bugs ? I have no clue of how "ts_parse" works, so from my point of view it could be any of: 1) wrong expectation of postgres about cygwin behaviour (I noticed that the code is full of "#if defined(platform)" that could break if the platform evolves) 2) a bug in latest cygwin library (cygwin core or newlib ) 3) a bug in one of the several other library that postgres is using 4) a bug in the latest version of C compiler In the past, on other softwares, I have seen any of these happening. So where I should look in the postgres code to understand why "123" is splitted in 3 token ? If (2) or (3) I need to pass a "simple" test case to the other core and package maintainers that shows the incorrect behaviour and allow to amend the bug or report to the upstream library developers. If (1) we need to amend postgres code, and for (4) report a test case to gcc developers and look for a temporary workaround Regards Marco -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From alvherre@2ndquadrant.com Sun Jan 26 02:25:48 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7FPw-00076a-Jt for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Jan 2014 02:25:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W7FPw-0007ac-0X for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Jan 2014 02:25:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7FPu-0007aV-UG for pgsql-bugs@postgresql.org; Sun, 26 Jan 2014 02:25:47 +0000 Received: from smtprelay0004.b.hostedemail.com ([64.98.42.4] helo=smtprelay.b.hostedemail.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7FPm-0005PI-O3 for pgsql-bugs@postgresql.org; Sun, 26 Jan 2014 02:25:45 +0000 Received: from filter.hostedemail.com (b-bigip1 [10.5.19.254]) by smtprelay02.b.hostedemail.com (Postfix) with ESMTP id 44934D398B; Sun, 26 Jan 2014 02:25:38 +0000 (UTC) X-Session-Marker: 616C76686572726540616C76682E6E6F2D69702E6F7267 X-Spam-Summary: 50, 0, 0, , d41d8cd98f00b204, alvherre@alvh.no-ip.org, :::, RULES_HIT:41:355:379:509:560:599:800:901:967:973:988:989:1260:1277:1311:1312:1313:1314:1345:1359:1437:1515:1516:1518:1519:1534:1539:1593:1594:1595:1596:1711:1714:1730:1747:1777:1792:2393:2525:2561:2564:2682:2685:2828:2859:2899:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3350:3865:3866:3867:3868:3870:3871:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4605:4659:5007:6119:6261:7514:7903:8599:9025:9121:9388:10004:10049:10400:10848:11232:11256:11257:11658:11914:12043:12296:12517:12519:13025:13069:13161:13229:13311:13357:13894:13895, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: error00_1409263d3c940 X-Filterd-Recvd-Size: 1678 Received: from eldon.alvh.no-ip.org (pc-211-245-160-190.cm.vtr.net [190.160.245.211]) (Authenticated sender: alvherre@alvh.no-ip.org) by omf11.b.hostedemail.com (Postfix) with ESMTPA; Sun, 26 Jan 2014 02:25:37 +0000 (UTC) Received: by eldon.alvh.no-ip.org (Postfix, from userid 1000) id A3E021FC9; Sat, 25 Jan 2014 23:25:35 -0300 (CLST) Date: Sat, 25 Jan 2014 23:25:35 -0300 From: Alvaro Herrera To: marco.atzeri@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token Message-ID: <20140126022535.GG10723@eldon.alvh.no-ip.org> References: <20140125065024.26700.13481@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140125065024.26700.13481@wrigleys.postgresql.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org marco.atzeri@gmail.com escribió: > SELECT * FROM ts_parse('default', '345 qwe@efd.r '' http://www.com/ > http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr > http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr > http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw To trace this, I would look at src/backend/tsearch/wparser_def.c; probably try compiling that file with WPARSER_TRACE defined, and compare the output of ts_parse() in something simple such as '345' in a working port with the failing one. That might give you clues as to what is causing the failure. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From marco.atzeri@gmail.com Sun Jan 26 08:10:43 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7Knj-00013i-Eq for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Jan 2014 08:10:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W7Kni-0001fU-UT for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Jan 2014 08:10:42 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7Kni-0001fO-5f for pgsql-bugs@postgresql.org; Sun, 26 Jan 2014 08:10:42 +0000 Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7Knb-0003lo-5r for pgsql-bugs@postgresql.org; Sun, 26 Jan 2014 08:10:41 +0000 Received: by mail-ea0-f173.google.com with SMTP id d10so1716307eaj.4 for ; Sun, 26 Jan 2014 00:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=fGwvfdt9Ci2M2MF6K9LdMsa/NT9TbRWEnydlzqM4rng=; b=g4JtG4TMwCoadz1e8Pu2a4fLLW50m/p24YGTBIqS2SN2Tk9GEQPEjwOz8j9bTviq1w +dYXDTpMDxBp+99sRQ17FadEw2saihYzFOUEfY14Xw2i/Sk5aMX/eG6IqEJ6VpQog0vc 46PnVbSTbLvn4E8y4xf/pCLNZKKTh+ms0MXK9lFILG+Ai3plnU88/DjH1T44yapQJ7Zk 9F4yvnVaSPMBopS2ppyuO9Jp9OdpJSohJ0htQL3tAdM7+2d2l3E2X8QiX0z/Ek6xm/gB m4a4DsFQEpCwQYDqDhRh2bh7A1Zv1TeFs35evjK9jNlsped4wf1TpP16J5B17kEOqBHR d1Bw== X-Received: by 10.14.88.131 with SMTP id a3mr2882471eef.64.1390723833066; Sun, 26 Jan 2014 00:10:33 -0800 (PST) Received: from [192.168.1.3] (ppp-140-166.32-151.iol.it. [151.32.166.140]) by mx.google.com with ESMTPSA id w4sm25993685eef.20.2014.01.26.00.10.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 00:10:32 -0800 (PST) Message-ID: <52E4C2F3.5020705@gmail.com> Date: Sun, 26 Jan 2014 09:10:27 +0100 From: Marco Atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> In-Reply-To: <20140126022535.GG10723@eldon.alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 26/01/2014 03:25, Alvaro Herrera wrote: > marco.atzeri@gmail.com escribió: > > > To trace this, I would look at src/backend/tsearch/wparser_def.c; > probably try compiling that file with WPARSER_TRACE defined, and compare > the output of ts_parse() in something simple such as '345' in a working > port with the failing one. That might give you clues as to what is > causing the failure. > database created with LANG=en_US.UTF-8 postgres=# SELECT * FROM ts_parse('default', '345'); ; tokid | token -------+------- 12 | 3 12 | 4 22 | 5 (3 rows) parsing "345" state TPS_Base at 3 matched rule 12 flags tostate TPS_InSpace state TPS_InSpace at 4 matched rule 8 flags BINGO tostate TPS_Base type blank state TPS_Base at 4 matched rule 12 flags tostate TPS_InSpace state TPS_InSpace at 5 matched rule 8 flags BINGO tostate TPS_Base type blank state TPS_Base at 5 matched rule 5 flags tostate TPS_InUnsignedInt state TPS_InUnsignedInt at EOF matched rule 0 flags BINGO tostate TPS_Base type uint database created with LANG=C postgres=# SELECT * FROM ts_parse('default', '345'); ; tokid | token -------+------- 22 | 345 (1 row) parsing "345" state TPS_Base at 3 matched rule 5 flags tostate TPS_InUnsignedInt state TPS_InUnsignedInt at 4 matched rule 1 flags state TPS_InUnsignedInt at 5 matched rule 1 flags state TPS_InUnsignedInt at EOF matched rule 0 flags BINGO tostate TPS_Base type uint -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From tgl@sss.pgh.pa.us Sun Jan 26 17:27:29 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7TUW-0003Nr-UP for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Jan 2014 17:27:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W7TUW-00011J-9o for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Jan 2014 17:27:28 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7TUV-00011C-6K for pgsql-bugs@postgresql.org; Sun, 26 Jan 2014 17:27:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W7TUL-00050M-SV for pgsql-bugs@postgresql.org; Sun, 26 Jan 2014 17:27:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s0QHRG4D003434; Sun, 26 Jan 2014 12:27:16 -0500 From: Tom Lane To: Marco Atzeri cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token In-reply-to: <52E4C2F3.5020705@gmail.com> References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> <52E4C2F3.5020705@gmail.com> Comments: In-reply-to Marco Atzeri message dated "Sun, 26 Jan 2014 09:10:27 +0100" Date: Sun, 26 Jan 2014 12:27:16 -0500 Message-ID: <3433.1390757236@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Marco Atzeri writes: > On 26/01/2014 03:25, Alvaro Herrera wrote: >> To trace this, I would look at src/backend/tsearch/wparser_def.c; >> probably try compiling that file with WPARSER_TRACE defined, and compare >> the output of ts_parse() in something simple such as '345' in a working >> port with the failing one. That might give you clues as to what is >> causing the failure. > [ trace ] As was suspected upthread, this shows that p_isdigit() is failing to recognize "3" as a digit. So you've got broken locale support somewhere. There are two different implementations of p_isdigit in wparser_def.c, depending on whether USE_WIDE_UPPER_LOWER is defined. It should be, in a Windows build, but maybe this is tracing back to a configure problem? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From marco.atzeri@gmail.com Sat Feb 1 20:16:50 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9gzh-0006nS-SW for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 20:16:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W9gzh-0001Gd-CG for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 20:16:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9gzg-0001GX-OE for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 20:16:48 +0000 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9gze-0006OQ-0f for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 20:16:48 +0000 Received: by mail-ea0-f170.google.com with SMTP id k10so2982737eaj.15 for ; Sat, 01 Feb 2014 12:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=inU+MhiyM9WIItnjzjYXNpDGItvYSuOZUlQdzPxRZzA=; b=p/ZqmwRlxcwk5fNcdqm1wIOAljEmowz8IKAh+ybL5xmfOYEcuypBlo2fcVjmaHkxGW l1bfgacL0UTvsjb5k61+GEQbYF+93mMIf2FtmF8Kb6B2iZ2KCcy/OAH+up2G30OCBKmd HG7tR7x4JfpFiovw1ML+qODG1NR1Xckc1Jv9ItnZdZ7pclc3NeCAETtiSsgRo92bSqCk 7MM9MM5nST9fO95LERhqDkJGNf2HlOXYEnvqJJxA4RgG6ms2FlZZ8FceSqIMSAiY8e4y 74meam4Wdt04xeT3KAg8Q++qFntiFClZ32CkMeAzdOWweW+9WM98Y1VYpnK5NL2Uawmp euVA== X-Received: by 10.15.102.78 with SMTP id bq54mr976264eeb.94.1391285804313; Sat, 01 Feb 2014 12:16:44 -0800 (PST) Received: from [192.168.2.112] (p5B17402E.dip0.t-ipconnect.de. [91.23.64.46]) by mx.google.com with ESMTPSA id d9sm26980817eei.9.2014.02.01.12.16.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Feb 2014 12:16:43 -0800 (PST) Message-ID: <52ED5627.4070005@gmail.com> Date: Sat, 01 Feb 2014 21:16:39 +0100 From: Marco Atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> <52E4C2F3.5020705@gmail.com> <3433.1390757236@sss.pgh.pa.us> In-Reply-To: <3433.1390757236@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 26/01/2014 18:27, Tom Lane wrote: > Marco Atzeri writes: >> On 26/01/2014 03:25, Alvaro Herrera wrote: >>> To trace this, I would look at src/backend/tsearch/wparser_def.c; >>> probably try compiling that file with WPARSER_TRACE defined, and compare >>> the output of ts_parse() in something simple such as '345' in a working >>> port with the failing one. That might give you clues as to what is >>> causing the failure. > >> [ trace ] > > As was suspected upthread, this shows that p_isdigit() is failing to > recognize "3" as a digit. So you've got broken locale support somewhere. > > There are two different implementations of p_isdigit in wparser_def.c, > depending on whether USE_WIDE_UPPER_LOWER is defined. It should be, in > a Windows build, but maybe this is tracing back to a configure problem? > > regards, tom lane > debugging a bit I think that is not a broken locale the first two times the character contains also a portion of the next digit so the result is always false. Eventually it was assumed that size of a wide char is always 32 bit ? "Unlike Windows UTF-16 2-byte wide chars, wchar_t on Linux and OS X is 4 bytes UTF-32 (gcc/g++ and XCode). On cygwin it is 2 (cygwin uses Windows APIs)." testing with "SELECT * FROM ts_parse('default', '345');" -------------------------------------------------------------- Breakpoint 1, p_isdigit (prs=0x80100930) at /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/src/backend/tsearch/wparser_def.c:560 560 p_iswhat(digit) (gdb) step 0x007036d8 in iswdigit () (gdb) step Single stepping until exit from function iswdigit, which has no line number information. iswdigit (c=3407923) at /usr/src/debug/cygwin-1.7.27-2/newlib/libc/ctype/iswdigit.c:35 35 return (c >= (wint_t)'0' && c <= (wint_t)'9'); (gdb) p/x c $77 = 0x340033 (gdb) finish Run till exit from #0 iswdigit (c=3407923) at /usr/src/debug/cygwin-1.7.27-2/newlib/libc/ctype/iswdigit.c:35 0x0060c510 in TParserGet (prs=0x80100930) at /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/src/backend/tsearch/wparser_def.c:1834 1834 if (item->isclass(prs) != 0) Value returned is $78 = 0 Breakpoint 1, p_isdigit (prs=0x80100930) at /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/src/backend/tsearch/wparser_def.c:560 560 p_iswhat(digit) (gdb) step 0x007036d8 in iswdigit () (gdb) step Single stepping until exit from function iswdigit, which has no line number information. iswdigit (c=3473460) at /usr/src/debug/cygwin-1.7.27-2/newlib/libc/ctype/iswdigit.c:35 35 return (c >= (wint_t)'0' && c <= (wint_t)'9'); (gdb) p/x c $79 = 0x350034 (gdb) finish Run till exit from #0 iswdigit (c=3473460) at /usr/src/debug/cygwin-1.7.27-2/newlib/libc/ctype/iswdigit.c:35 0x0060c510 in TParserGet (prs=0x80100930) at /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/src/backend/tsearch/wparser_def.c:1834 1834 if (item->isclass(prs) != 0) Value returned is $80 = 0 Breakpoint 1, p_isdigit (prs=0x80100930) at /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/src/backend/tsearch/wparser_def.c:560 560 p_iswhat(digit) (gdb) step 0x007036d8 in iswdigit () (gdb) step Single stepping until exit from function iswdigit, which has no line number information. iswdigit (c=53) at /usr/src/debug/cygwin-1.7.27-2/newlib/libc/ctype/iswdigit.c:35 35 return (c >= (wint_t)'0' && c <= (wint_t)'9'); (gdb) p/x c $81 = 0x35 (gdb) finish Run till exit from #0 iswdigit (c=53) at /usr/src/debug/cygwin-1.7.27-2/newlib/libc/ctype/iswdigit.c:35 0x0060c510 in TParserGet (prs=0x80100930) at /pub/devel/postgresql/postgresql-9.3.2-2/src/postgresql-9.3.2/src/backend/tsearch/wparser_def.c:1834 1834 if (item->isclass(prs) != 0) Value returned is $82 = 1 ------------------------------------------------------------------------- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From tgl@sss.pgh.pa.us Sat Feb 1 22:27:22 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9j22-00020m-4w for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 22:27:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W9j21-0000Rr-G0 for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 22:27:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9j20-0000Rk-Fr for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 22:27:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9j1t-0000Ci-PL for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 22:27:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s11MRBfg015801; Sat, 1 Feb 2014 17:27:11 -0500 From: Tom Lane To: Marco Atzeri cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token In-reply-to: <52ED5627.4070005@gmail.com> References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> <52E4C2F3.5020705@gmail.com> <3433.1390757236@sss.pgh.pa.us> <52ED5627.4070005@gmail.com> Comments: In-reply-to Marco Atzeri message dated "Sat, 01 Feb 2014 21:16:39 +0100" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <15783.1391293582.0@sss.pgh.pa.us> Date: Sat, 01 Feb 2014 17:27:11 -0500 Message-ID: <15800.1391293631@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15783.1391293582.1@sss.pgh.pa.us> Marco Atzeri writes: > Eventually it was assumed that size of a wide char is always 32 bit ? Hm. It looks like there's an entirely unnecessary assumption that wchar_t and wint_t are the same width. Does the attached patch make things better for you? regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="fix-wchar_t-width-assumption.patch"; charset="us-ascii" Content-ID: <15783.1391293582.2@sss.pgh.pa.us> Content-Description: fix-wchar_t-width-assumption.patch Content-Transfer-Encoding: quoted-printable diff --git a/src/backend/tsearch/wparser_def.c b/src/backend/tsearch/wparse= r_def.c index fa73dff..6728212 100644 *** a/src/backend/tsearch/wparser_def.c --- b/src/backend/tsearch/wparser_def.c *************** TParserCopyClose(TParser *prs) *** 432,438 **** * or give wrong result. * - multibyte encoding and C-locale often are used for * Asian languages. ! * - if locale is C the we use pgwstr instead of wstr */ =20=20 #ifdef USE_WIDE_UPPER_LOWER --- 432,438 ---- * or give wrong result. * - multibyte encoding and C-locale often are used for * Asian languages. ! * - if locale is C then we use pgwstr instead of wstr. */ =20=20 #ifdef USE_WIDE_UPPER_LOWER *************** p_is##type(TParser *prs) { \ *** 444,452 **** if ( prs->usewide ) \ { \ if ( prs->pgwstr ) \ ! return is##type( 0xff & *( prs->pgwstr + prs->state->poschar) );\ ! \ ! return isw##type( *(wint_t*)( prs->wstr + prs->state->poschar ) ); \ } \ \ return is##type( *(unsigned char*)( prs->str + prs->state->posbyte ) ); \ --- 444,456 ---- if ( prs->usewide ) \ { \ if ( prs->pgwstr ) \ ! { \ ! unsigned int c =3D *(prs->pgwstr + prs->state->poschar); \ ! if ( c > 0x7f ) \ ! return 0; \ ! return is##type( c ); \ ! } \ ! return isw##type( *( prs->wstr + prs->state->poschar ) ); \ } \ \ return is##type( *(unsigned char*)( prs->str + prs->state->posbyte ) ); \ *************** p_isalnum(TParser *prs) *** 475,484 **** if (c > 0x7f) return 1; =20=20 ! return isalnum(0xff & c); } =20=20 ! return iswalnum((wint_t) *(prs->wstr + prs->state->poschar)); } =20=20 return isalnum(*(unsigned char *) (prs->str + prs->state->posbyte)); --- 479,488 ---- if (c > 0x7f) return 1; =20=20 ! return isalnum(c); } =20=20 ! return iswalnum(*(prs->wstr + prs->state->poschar)); } =20=20 return isalnum(*(unsigned char *) (prs->str + prs->state->posbyte)); *************** p_isalpha(TParser *prs) *** 507,516 **** if (c > 0x7f) return 1; =20=20 ! return isalpha(0xff & c); } =20=20 ! return iswalpha((wint_t) *(prs->wstr + prs->state->poschar)); } =20=20 return isalpha(*(unsigned char *) (prs->str + prs->state->posbyte)); --- 511,520 ---- if (c > 0x7f) return 1; =20=20 ! return isalpha(c); } =20=20 ! return iswalpha(*(prs->wstr + prs->state->poschar)); } =20=20 return isalpha(*(unsigned char *) (prs->str + prs->state->posbyte)); ------- =_aaaaaaaaaa0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ------- =_aaaaaaaaaa0-- From marco.atzeri@gmail.com Sat Feb 1 22:54:46 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9jSX-0002lS-Qr for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 22:54:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W9jSX-0004It-6i for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 22:54:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9jSW-0004Im-6R for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 22:54:44 +0000 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9jST-0000e8-Go for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 22:54:43 +0000 Received: by mail-ee0-f49.google.com with SMTP id d17so2930411eek.22 for ; Sat, 01 Feb 2014 14:54:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=XpqjAlaz3+Mef4tuYvszBS8Lv5wniW1lQh9+IXvMzkI=; b=ZV78XsIjc3Ad46+Kch1If73mvu6JL1rFkItm9WBsVxNxFaqrY/26+6Ze8SJplzZEKH TWD6FuvIZnzwlpG2O5D5EO37W2gyAFJdHejvann/u1FiIvOpZis58o1e1oLeWPN6C6do /sRmZrOeY7x70O26sHJrXUyFsYW2qsTy+6aMxdS//fa4jGkzN2UaQ6mtum6qoP+zOxdU t0unRv0IbACO02Gw5+r3dW8RsBQS4W7LYXBG7GSTh0BEgxTTUN3cRifPi22h/ukhGv3N GA6Brn78MShZzQCW144HsAK4furGbM9mAzme2wBxpezMgafXW7HLBsTozJvlPKc3hv5G lNiQ== X-Received: by 10.15.54.72 with SMTP id s48mr33249560eew.3.1391295279486; Sat, 01 Feb 2014 14:54:39 -0800 (PST) Received: from [192.168.2.112] (p5B17402E.dip0.t-ipconnect.de. [91.23.64.46]) by mx.google.com with ESMTPSA id k41sm44202481een.19.2014.02.01.14.54.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Feb 2014 14:54:38 -0800 (PST) Message-ID: <52ED7B2A.4010608@gmail.com> Date: Sat, 01 Feb 2014 23:54:34 +0100 From: Marco Atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> <52E4C2F3.5020705@gmail.com> <3433.1390757236@sss.pgh.pa.us> <52ED5627.4070005@gmail.com> <15800.1391293631@sss.pgh.pa.us> In-Reply-To: <15800.1391293631@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 01/02/2014 23:27, Tom Lane wrote: > Marco Atzeri writes: >> Eventually it was assumed that size of a wide char is always 32 bit ? > > Hm. It looks like there's an entirely unnecessary assumption that wchar_t > and wint_t are the same width. Does the attached patch make things better > for you? > > regards, tom lane > tested on 9.3.2 with LANG=en_US.UTF-8 tsearch ... ok Thanks Marco -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs From tgl@sss.pgh.pa.us Sat Feb 1 23:01:07 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9jYg-00033J-SD for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 23:01:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W9jYg-00059N-5A for pgsql-bugs@arkaria.postgresql.org; Sat, 01 Feb 2014 23:01:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9jYf-00059F-7X for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 23:01:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W9jYd-0008Df-1A for pgsql-bugs@postgresql.org; Sat, 01 Feb 2014 23:01:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s11N117A016580; Sat, 1 Feb 2014 18:01:01 -0500 From: Tom Lane To: Marco Atzeri cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token In-reply-to: <52ED7B2A.4010608@gmail.com> References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> <52E4C2F3.5020705@gmail.com> <3433.1390757236@sss.pgh.pa.us> <52ED5627.4070005@gmail.com> <15800.1391293631@sss.pgh.pa.us> <52ED7B2A.4010608@gmail.com> Comments: In-reply-to Marco Atzeri message dated "Sat, 01 Feb 2014 23:54:34 +0100" Date: Sat, 01 Feb 2014 18:01:01 -0500 Message-ID: <16579.1391295661@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Marco Atzeri writes: > On 01/02/2014 23:27, Tom Lane wrote: >> Hm. It looks like there's an entirely unnecessary assumption that wchar_t >> and wint_t are the same width. Does the attached patch make things better >> for you? > tested on 9.3.2 with LANG=en_US.UTF-8 > tsearch ... ok Excellent, I'll go commit this. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs