Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D9DC76323B8 for ; Sun, 30 May 2010 07:38:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 46857-10 for ; Sun, 30 May 2010 10:38:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtpcorp.com (smtpcorp.com [67.192.120.76]) by mail.postgresql.org (Postfix) with ESMTP id 1E13C635189 for ; Sun, 30 May 2010 07:38:18 -0300 (ADT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=main; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:Message-ID:Date:Subject:From:To; bh=+msT+K2L5D3JA5tX6kPDuJ3EjbVH3pNBKr7yytWaTNs=; b=IGuSTKuLO5q1QErsx4EEinRUzfzcQau0dh3fTlYq4TlN22yJ3gEEYiGOhwpGBp8bvHX5AYVXrxv0nvDzZWvgzAdFL5nAeah4kcTGE4LFWmPrKjIvumaPmmcKIVXBQOeo; Received: from ip-118-90-128-248.xdsl.xnet.co.nz ([118.90.128.248] helo=gonzo) by smtpcorp.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.70) id 1OIfuK-0004zZ-1O; mid 144 for pgsql-sql@postgresql.org; Sun, 30 May 2010 10:37:52 +0000 Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1OIfu9-0001Yn-66 for pgsql-sql@postgresql.org; Sun, 30 May 2010 22:38:05 +1200 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: Extending Regular Expression bounds limit of 255. Date: 30 May 2010 10:37:59 GMT Organization: Dis (not Dat) Organisation Lines: 35 Message-ID: References: NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1275215879 5999 127.0.0.1 (30 May 2010 10:37:59 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Smtpcorp-Track: 3547530.1.45951665 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201005/143 X-Sequence-Number: 34191 On 2010-05-29, Tim Landscheidt wrote: > Jasen Betts wrote: > >>> It looks like most of our tools are using the Perl version of regular >>> expressions with an upper limit of a bound being 32766. Is there any way to >>> change this in PG? Or can I change from POSIX to Perl? > >> perhaps you can do something in pl-perl? > >> posix regular expressions are different to perl regular expressions in >> several ways. > > Another last resort possibility would of course be to "pre- > compile" the regular expressions from "A{2000}" to > "A{255}A{255}A{255}A{255}A{255}A{255}A{255}A{215}" (A{200}){10} might work better. > (with the headaches of "A{1000,2000}" left as an exercise to the read- > er :-)). easy enoungh to write, but probably easy to write an expression with factorial complexity too, but this one should work, having at worst two ways of matching any string. (A{200}){5,9}A{0,200} but (A{5,10}){200} is asking for trouble.