Re: psql scripting tutorials - Mailing list pgsql-general

From John DeSoi
Subject Re: psql scripting tutorials
Date
Msg-id FD74282C-4343-49C2-87A2-A6E41E444E79@pgedit.com
Whole thread Raw
In response to Re: psql scripting tutorials  (Artacus <artacus@comcast.net>)
List pgsql-general
On Sep 10, 2008, at 2:46 AM, Artacus wrote:

> Who else is doing something like this? Can psql access environmental
> variables or command line params? Or do I have to have my bash
> script write a psql script every time?


The psql \! command can execute shell commands. You can also use ``,
e.g.

=> \echo `date`
Wed Sep 10 08:07:19 EDT 2008


John DeSoi, Ph.D.





pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: "Stuck" query
Next
From: Tommy Gildseth
Date:
Subject: Re: "Stuck" query