Search Postgresql Archives

Need regexp_replace help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 !


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux