5 echo "#ifndef" __PGCONSTS_H__
6 echo "#define" __PGCONSTS_H__
9 psql
-d $DBNAME -c "select '@', oid, typname from pg_type where typcategory in ('I','B','U','S','N','E','D','V','T','Z') order by oid" |
grep "@" |
while read L
11 OID
=`echo $L | awk '{print $3}'`
12 NAME
=`echo $L | awk '{print toupper($5)}' | sed "s/_T//"`
13 echo "#define OID_$NAME $OID"
17 echo "#endif" // __PGCONSTS_H__