On Thu, 2010-02-18 at 09:33 -0600, Little, Douglas wrote:
> psql p1gp1 <>$LOGFile 2>&1
>
> \set ON_ERROR_STOP
>
> select da_test.QATestBuild(false)
>
> QUIT
mod to your needs...
$ cat dummy.sql
#MYTESTID=`psql -t -c "select da_test.QATestBuild(false)" dbname`
MYTS=`psql -t -c "select to
On Thu, Feb 18, 2010 at 10:33 AM, Little, Douglas wrote:
> psql
>
> orbitz=# \!testvar=1234
>
> orbitz=# \!export testvar
>
> orbitz=# \!echo $testvar
>
> 1234
>
> orbitz=# \q
>
> -bash-3.00$ echo
> $testvar
>
>
> 1234
>
What shell are you using that allows a child process to alter the parent
pro
Hello,
I want to get a sql select output into a psql variable. Any ideas how I might
need to do this.
My script executes a function which returns a TESTID. I'd like to imbed the
testid in the script output filenames.
I see that psql can set environment variables with the psql \i command.
But