#!/bin/sh
-# $PostgreSQL: pgsql/src/tools/find_static,v 1.5 2006/07/14 14:59:00 momjian Exp $
+# src/tools/find_static
trap "rm -f /tmp/$$" 0 1 2 3 15
# symbol, then the function name.
find . -name '[a-z]*.o' -type f -print | while read FILE
-do
- nm $FILE | cut -c10-100 |awk '{printf "%s\t%s\t%s\n", "'"$FILE"'",$1,$2}'
+do nm $FILE | cut -c17-100 |awk '{printf "%s\t%s\t%s\n", "'"$FILE"'",$1,$2}'
done >/tmp/$$
dropdb debug
createdb debug
copy debug from '/tmp/"$$"';
- select *
- into table debug2
+ select *
+ into table debug2
from debug;
create index idebug on debug(scope,func);
vacuum debug;
vacuum debug2;
- update debug2
- set scope = '_'
+ update debug2
+ set scope = '_'
from debug
where debug2.func = debug.func and
debug2.scope = 'T' and debug.scope = 'U';
where scope = 'T' and func != 'main'
order by file, func;
" |psql debug
-