Re: psql & unix env variables

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql & unix env variables
Date: 2012-08-29 17:39:39
Message-ID: 42085028.0bXsUE5x9I@skynet.simkin.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ryan Kelly 2012-08-29 17:40:40 Re: psql & unix env variables
Previous Message Little, Douglas 2012-08-29 17:35:32 psql & unix env variables