Need regexp_replace help

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Need regexp_replace help
Date: 2013-02-14 21:37:02
Message-ID: 0AD01C53605506449BA127FB8B99E5E161146A32@FMSMSX105.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Trying ( and failing) to get this to run...

select regexp_replace(pg_get_functiondef(proname::regproc),E'[ ]+\\+\n','\n') from pg_proc where proname = 'maketime';

Goal is to remove the space padding and the "+" at the end of each line in the dump of pg_get_functiondef, something that could actually be run if sent out to a file (\o) and then read into another DB (\i). Of course the ";" would have to be appended at the end, but I can manage that :-)

Thanks in Advance !

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-02-14 21:42:45 Re: Need regexp_replace help
Previous Message Aleksey Tsalolikhin 2013-02-14 20:53:25 Re: Graphing query results from within psql.