Re: script variables - Mailing list pgsql-general

From Richard Huxton
Subject Re: script variables
Date
Msg-id 42369B74.20604@archonet.com
Whole thread Raw
In response to script variables  (Paul Cunningham <paulcunningham@sprintmail.com>)
List pgsql-general
Paul Cunningham wrote:
> I use a bash script (similar to following example) to update tables.
>
> psql -v passed_in_var=\'some_value\'  -f script_name ....
>
> Is it possible to pass a value back from psql to the bash script?

You can pass the textual output of psql back with backticks:
  echo `psql ...`

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Paul Newman"
Date:
Subject: New to Schemas - Good for Multi Company in one DB ?
Next
From: "Sim Zacks"
Date:
Subject: Re: plpython function problem workaround