Re: script variables

From: Richard Huxton <dev(at)archonet(dot)com>
To: Paul Cunningham <paulcunningham(at)sprintmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: script variables
Date: 2005-03-15 08:23:16
Message-ID: 42369B74.20604@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2005-03-15 08:40:00 Re: plpython function problem workaround
Previous Message Paul Newman 2005-03-15 08:14:10 New to Schemas - Good for Multi Company in one DB ?