>> Can an SQL database (PostgreSQL) be connected to shell in a way that if
>> a directory is changed on shell it will update the database with the
>> changes? If so how?
I assumed what he really meant was detecting additions or deletions of
files in a particular Unix directory, not trapping chdir's all over
the system...
If instant response isn't too critical, having a daemon process scan
the directory every five minutes or so seems like the least expensive/
intrusive way to do it.
regards, tom lane