Re: window function to sort times series data? - Mailing list pgsql-sql

From Josh Kupershmidt
Subject Re: window function to sort times series data?
Date
Msg-id 4ec1cf761003241213p26d5bccesdaf5283dda2725ca@mail.gmail.com
Whole thread Raw
In response to Re: window function to sort times series data?  (John Gage <jsmgage@gmail.com>)
Responses Dollar quoted strings
List pgsql-sql
On Wed, Mar 24, 2010 at 2:38 PM, John Gage <jsmgage@gmail.com> wrote:
> 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$);

The $re$ is just an arbitrary identifier for a dollar-quoted string
constant. See:

http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html

Maybe you're on an old version which doesn't support dollar-quoted strings?

On 8.3 for the above query, I get:

SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$);regexp_matches
----------------{bar,beque}
(1 row)

Josh


pgsql-sql by date:

Previous
From: John Gage
Date:
Subject: Re: window function to sort times series data?
Next
From: Louis-David Mitterrand
Date:
Subject: Re: Does IMMUTABLE property propagate?