Thread: Solved Problem for Postmaster
This solved my problem... Thank-you Sean. ____________________________________________________________________________ _ You are probably not telling Postgres to run in the background. You should use the -S parameter. IE: postgres -S -i -D /usr/local/pgsql/data For full info on the startup options, do a man postmaster from your shell. Or take a look at the administration docs. At 01:05 PM 7/14/00, Sean Alphonse wrote: >Pressing enter doesn't solve the problem. > >Sean. > >___________________________________________________________________________ _ >_______ > >On Fri, Jul 14, 2000 at 10:04:04AM -0500, Sean Alphonse wrote: > > Hello. > > I am using PostgreSQL version 7.0.2 with RedHat 6.1. When I start up the > > postmaster at the prompt, I get the following response and the session >hangs > > and doesn't return to the prompt but I am able to use my databases and > > PostgreSQL. Is this normal or correct? If not, what should I do to fix >this > > problem? > >Hit "enter". You'll find you actually do have a prompt. > >A > >-- >Andrew Sullivan Computer Services ><sullivana@bpl.on.ca> Burlington Public Library >+1 905 639 3611 x158 2331 New Street > Burlington, Ontario, Canada L7R 1J4
How does one escape parenthesis in a regular expression in Postgres? An example is: select * from subcategories where subcategory ~* '401(k)'; Which does not work. I've tried: select * from subcategories where subcategory ~* '401\(k\)'; That still didn't work. Any advice would be much appreciated. BTW, select * from subcategories where subcategory = '401(k)'; does work. ; ) steve
You were close, you need two backslashes. IE, '401\\(k\\)' The reasoning for this is that the first slash is taken off by the preprocessor, and then it goes through another processor for the regular expression matching. BTW: If you ever want to doa search for a slash itself, you need 4 slashes, ie: 'This \\\\ way' At 03:00 PM 7/14/00, Steve Wolfe wrote: > How does one escape parenthesis in a regular expression in Postgres? > > An example is: > >select * from subcategories where subcategory ~* '401(k)'; > >Which does not work. I've tried: > >select * from subcategories where subcategory ~* '401\(k\)'; > >That still didn't work. Any advice would be much appreciated. BTW, > >select * from subcategories where subcategory = '401(k)'; > >does work. ; ) > >steve
"Steve Wolfe" <steve@iboats.com> writes: > How does one escape parenthesis in a regular expression in Postgres? > select * from subcategories where subcategory ~* '401\(k\)'; > That still didn't work. You need two backslashes: select * from subcategories where subcategory ~* '401\\(k\\)'; The first of each pair gets eaten by the parser when the string literal is parsed, so what arrives at the ~* operator at runtime is 401\(k\) which is what you need. regards, tom lane