Re: [HACKERS] DB-shell connect - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] DB-shell connect
Date
Msg-id 199807011530.LAA19432@candle.pha.pa.us
Whole thread Raw
In response to DB-shell connect  (Gregory Holston <holston@itd.nrl.navy.mil>)
Responses Re: [HACKERS] DB-shell connect
List pgsql-hackers
>
> 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?
> A prompt reply would be appreciated.
>
> Thank in advance,
> Greg
>
>
>

That is tough.  It is normally very difficult to trigger 'anything' if
someone changes a directory in their shell.  It would have to be
triggered in the kernel, and out of the kernel up to an SQL process.
Very tough.

Their are Unix tools that monitor the everyone's current directory, but
they are polling tools, not some automatic thing on every directory
change.

It is the chdir() kernel call you want to trigger on.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: your mail
Next
From:
Date:
Subject: Re: [HACKERS] DB-shell connect