select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';
what's worse:
$ select regexp_replace( 'depesz depeszx depesz', E'^(.*)( \\1)+$', E'\\1' );
regexp_replace
depesz
(1 row)
I know that Pg regexps are limited, but even grep's regexps match this
correctly:
=$ printf 'depesz dep
On 4 February 2012 09:46, hubert depesz lubaczewski wrote:
> select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';
>
> what's worse:
> $ select regexp_replace( 'depesz depeszx depesz', E'^(.*)( \\1)+$', E'\\1'
> );
> regexp_replace
>
> depesz
> (1 row)
>
> I know that Pg regexps ar
On Sat, Feb 04, 2012 at 09:54:34AM +0100, Szymon Guz wrote:
> On 4 February 2012 09:46, hubert depesz lubaczewski wrote:
>
> > select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';
> >
> > what's worse:
> > $ select regexp_replace( 'depesz depeszx depesz', E'^(.*)( \\1)+$', E'\\1'
> > );
> > regexp_
On 02/04/2012 02:37 AM, Dave Potts wrote:
> I have just inherited a private C module that lives in the context of
> the server with little or no documentation.
>
> It crashes taking the database down, is there any advice on how to
> debug this type of beast ?
>
> This is not a problem with the p
On Feb 4, 2012, at 3:58, hubert depesz lubaczewski wrote:
> On Sat, Feb 04, 2012 at 09:54:34AM +0100, Szymon Guz wrote:
>> On 4 February 2012 09:46, hubert depesz lubaczewski wrote:
>>
>>> select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';
>>>
>>> what's worse:
>>> $ select regexp_replace( 'dep
Dave Potts writes:
> I have just inherited a private C module that lives in the context of
> the server with little or no documentation.
> It crashes taking the database down, is there any advice on how to
> debug this type of beast ?
It isn't a lot different from debugging code that's part of
On 4 Feb 2012, at 9:46, hubert depesz lubaczewski wrote:
> select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$';
Peculiar.
It's probably no use to you, but a version where the repetition is expanded
(for that particular string) works:
select 'depesz depeszx depesz' ~ E'^(.*)( \\1)( \\1)$';
And t
On Sat, Feb 04, 2012 at 07:31:25PM +0100, Alban Hertroys wrote:
> > I know that Pg regexps are limited, but even grep's regexps match this
>
> Limited? They're really not. According to the docs they are beyond
> POSIX compliant, even including several extensions as they appear in,
> among others,
hubert depesz lubaczewski writes:
> On Sat, Feb 04, 2012 at 07:31:25PM +0100, Alban Hertroys wrote:
>> Limited? They're really not.
> Limited - because (for example) Pg regexps, are the only regexp flavour
> that I know that you can't have both greedy and non-greedy operators in
> the same expres
On Sat, Feb 04, 2012 at 03:27:53PM -0500, Tom Lane wrote:
> hubert depesz lubaczewski writes:
> > that I know that you can't have both greedy and non-greedy operators in
> > the same expression.
>
> Huh? Sure you can.
wrote about it year ago:
http://archives.postgresql.org/pgsql-general/2010-0
10 matches
Mail list logo