Dumping a function definition
Wed Mar 15 17:09:03 2017
I frequently need to get the definition of a function out of postgres, so here's a small shell script I wrote to do that.
#!/bin/sh
{
cat <<EOS
select pg_get_functiondef(oid)
from pg_proc where proname = '$1'
;
EOS
} | psql -Aqt
Posted in / software / postgres