Commit 16ffff31 authored by iSergio's avatar iSergio
Browse files

Select functions for specified databse

parent 42e33f26
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
#!/bin/bash
psql -U postgres -A -R "," -h $1 $2 -c "SELECT routines.routine_name
FROM information_schema.routines
    LEFT JOIN information_schema.parameters ON routines.specific_name=parameters.specific_name
WHERE
routine_definition ILIKE '%INSERT%' OR routine_definition ILIKE '%DELETE%' OR routine_definition ILIKE '%UPDATE%'
ORDER BY routines.routine_name, parameters.ordinal_position;"