Run external command as part of an sql statement ?

From: David Gauthier <davegauthierpg(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Run external command as part of an sql statement ?
Date: 2018-05-07 21:35:49
Message-ID: CAMBRECD0cW4mvg_ZfRX=qW8iJanCVjQU+j=Yx5J7jbn4uBSZ2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi:

At the psql prompt, I can do something like...
"select \! id -nu"
...to get the uid of whoever's running psql.

I want to be able to run a shell command like this from within a stored
procedure. Is there a way to do this ?

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-05-07 21:41:39 Re: Run external command as part of an sql statement ?
Previous Message a 2018-05-07 20:20:16 How to manipulate tuples in C functions?