Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 67919633AF8 for ; Wed, 24 Mar 2010 15:38:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14562-03 for ; Wed, 24 Mar 2010 18:38:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f223.google.com (mail-ew0-f223.google.com [209.85.219.223]) by mail.postgresql.org (Postfix) with ESMTP id BDF6B632CBF for ; Wed, 24 Mar 2010 15:38:29 -0300 (ADT) Received: by ewy23 with SMTP id 23so894323ewy.34 for ; Wed, 24 Mar 2010 11:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=lRJjeTjlNxeE2JnpEc7ZV/G3TozfNZs7wmvsxmYlAUs=; b=F7hHJJNfO3ni9s6gavlZ7DQK8Y5fBoOcbU3N837xA/dOOtwdnS0kJBda9wzBMQid8C VwdxeRpCmg6L08tf8Xq5dY8Y1fNC07v4iBdCoIJ/Gsi9R0KNTjLdg8OZ1S0zuSyd1kSX ZJ+McPGjATgCXajeQTIwFdxuwL6X0CNtG0eDs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=tyZwzRUdOlab0CjNNPJsHBIYggHjSmfpi5qHjaXcV9hiGxf6vKb8cg2F8JCZpp8Vn9 /QYeBaaUvN64QZKNxHAXoLlXOykb3XpiDoJRM0XMMkbD8rzjxOgODJZ3J+nokuw1xJXP j3mwvhCVtCpGZWWBTz9RNuK3fG05padOXQLZI= MIME-Version: 1.0 Received: by 10.213.50.84 with SMTP id y20mr5905077ebf.71.1269455907665; Wed, 24 Mar 2010 11:38:27 -0700 (PDT) In-Reply-To: <20100324140832.GA5864@apartia.fr> References: <20100324140832.GA5864@apartia.fr> Date: Wed, 24 Mar 2010 19:38:27 +0100 Message-ID: Subject: Re: window function to sort times series data? From: John Gage To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=0014852eaac46f38910482903c9f X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/177 X-Sequence-Number: 33884 --0014852eaac46f38910482903c9f Content-Type: text/plain; charset=ISO-8859-1 In going through the arcana of string functions, I have come across the following series of selects that contain, for me, a mysterious "$re$". -- return all matches from regexp SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$); -- test case insensitive SELECT regexp_matches('foObARbEqUEbAz', $re$(bar)(beque)$re$, 'i'); -- global option - more than one match SELECT regexp_matches('foobarbequebazilbarfbonk', $re$(b[^b]+)(b[^b]+)$re$, 'g'); When I run this I get: regexp_matches -------------------------- I have not been able to find out what it all means. Forgive me for my blindness. John P.S. The author of the statements is "alexk" at Command Prompt. They are test statements against Postgres' string functions. --0014852eaac46f38910482903c9f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable In going through the arcana of string functions, I have come across the fol= lowing series of selects that contain, for me, a mysterious "$re$"= ;.

-- return all matches from regexp
SELECT regexp_matches('f= oobarbequebaz', $re$(bar)(beque)$re$);

-- test case insensitive
SELECT regexp_matches('foObARbEqUEbAz&#= 39;, $re$(bar)(beque)$re$, 'i');

-- global option - more tha= n one match
SELECT regexp_matches('foobarbequebazilbarfbonk', $r= e$(b[^b]+)(b[^b]+)$re$, 'g');

When I run this I get:

regexp_matches
-----------------------= ---
<Unknown(2,003)>

I have not been able to find out what = it all means.=A0 Forgive me for my blindness.

John

P.S. The a= uthor of the statements is "alexk" at Command Prompt.=A0 They are= test statements against Postgres' string functions.
--0014852eaac46f38910482903c9f--