Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] DB-shell connect

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: holston(at)itd(dot)nrl(dot)navy(dot)mil (Gregory Holston)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] DB-shell connect
Date: 1998-07-01 15:30:25
Message-ID: 199807011530.LAA19432@candle.pha.pa.us (view raw or flat)
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)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)

In response to

Responses

pgsql-hackers by date

Next:From: geek+Date: 1998-07-01 15:48:21
Subject: Re: [HACKERS] DB-shell connect
Previous:From: The Hermit HackerDate: 1998-07-01 15:05:31
Subject: Re: your mail

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group