Re: psql & unix env variables - Mailing list pgsql-general

From Alan Hodgson
Subject Re: psql & unix env variables
Date
Msg-id 42085028.0bXsUE5x9I@skynet.simkin.ca
Whole thread Raw
In response to psql & unix env variables  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
List pgsql-general
On Wednesday, August 29, 2012 12:35:32 PM Little, Douglas wrote:
> Is there a method for having unix env variables incorporated into a psql sql
> statement? Ie
> Export var='dev'
> Psql =c 'select count(*) from $var.customer;'
>

Use double-quotes, not single-quotes. Bash won't interpolate variables into
single-quoted strings.


pgsql-general by date:

Previous
From: "Little, Douglas"
Date:
Subject: psql & unix env variables
Next
From: Ryan Kelly
Date:
Subject: Re: psql & unix env variables