#!/bin/sh
export PGPASSWORD=PYnuOIXNbkVOvdTL
P="psql -h 127.0.0.1 -U bgar1_delta_com -d bgar1_delta_com_ingredi -tA"
echo "== tables (rest)"
$P -c "select table_name from information_schema.tables where table_schema='public' order by 1" | sed -n '78,200p'
echo "== config-ish"
$P -c "select table_name from information_schema.tables where table_schema='public' and (table_name ~ 'config|setting|ldap|saml|auth|sso|directory|domain|account') order by 1"
echo "== columns mentioning ldap/bind"
$P -c "select table_name||'.'||column_name from information_schema.columns where table_schema='public' and (column_name ~ 'ldap|bind|password|secret|token') order by 1 limit 60"
