Running variable commands from psql - Mailing list pgsql-general

From Bruce Momjian
Subject Running variable commands from psql
Date
Msg-id 201008301655.o7UGttQ11412@momjian.us
Whole thread Raw
List pgsql-general
Is there a way to pass a psql variable into a \! command in psql, e.g.:

    test=> \set x ls
    test=> \! :x
    :x: not found

I specifically want the currently connected database name to be passed
to a \! command.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Database corruption
Next
From: Arjen Nienhuis
Date:
Subject: Re: How to convert a binary filed to an integer field?