[SQL] How do you do the opposite of regexp_split_to_table?

2010-08-03 Thread John Gage
I would like to take several rows from a select and have them grouped into one row with the text contents of one field in all the rows concatenated into one field in the single row of the group group. The contents of the other fields are identical across the rows. This is the

Re: [SQL] [GENERAL] Tsearch not searching 'Y'

2010-05-03 Thread John Gage
You can avoid stemming by using 'simple' instead of 'english' as the language of the words in to_tsvector (which is a little more awkward than the cast). There are no stop words for the simple dictionary. It will just convert to lower case, and index every unique word. SELECT

[SQL] Help with reg_exp

2010-03-25 Thread John Gage
[I mistakenly used the wrong Subject line initially with this post] 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',

[SQL] Dollar quoted strings

2010-03-25 Thread John Gage
for directing me to the doc's on dollar quoting. John On Mar 24, 2010, at 8:13 PM, Josh Kupershmidt wrote: On Wed, Mar 24, 2010 at 2:38 PM, John Gage jsmg...@gmail.com wrote: In going through the arcana of string functions, I have come across the following series of selects that contain

Re: [SQL] window function to sort times series data?

2010-03-24 Thread John Gage
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