Re: executing os commands from a function

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "Armand Pirvu (home)" <armand(dot)pirvu(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: executing os commands from a function
Date: 2016-09-30 15:45:32
Message-ID: CAKFQuwYoQcEQ83B=tty-D0seT0=rfWbMxCZxAA5jnX_SDaGy+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 29, 2016 at 2:41 PM, Armand Pirvu (home) <armand(dot)pirvu(at)gmail(dot)com
> wrote:

> I used plsh extension but I had to use two functions and a trigger, see
> code below
>

​I don't see any way to not use a trigger given your requirement. And as
written I don't see that you need the second function​ - just write the
trigger function in plsh. Admittedly its probably better to have two
functions from an architecture standpoint.

Listen/Notify doesn't seem to make sense as you want the server to ensure
that the file exists - not some other client that may or may not be
connected.

​David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rakesh Kumar 2016-09-30 15:45:44 Re: Multi tenancy : schema vs databases
Previous Message Francisco Olarte 2016-09-30 15:36:01 Re: executing os commands from a function