Re: psql -F <TAB>

From: Kazuyuki Maejima <kmaejima(at)oak(dot)ocn(dot)ne(dot)jp>
To: T E Schmitz <mailreg(at)numerixtechnology(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: psql -F <TAB>
Date: 2006-11-16 14:31:57
Message-ID: 455C765D.7030504@oak.ocn.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joe Conway wrote:
> Try:
> psql -A -t -U $DBUSER -d $DB -c "$QUERY" -F $'\t'

That's excellent, but please let me post a different way :)
by passing commands from stdin:

#!/bin/sh
cat <<EOT | psql -q -A -t -U $DBUSER -d $DB
\f '\t'
$QUERY
EOT

I think this will work even if your /bin/sh is not bash
(like FreeBSD and NetBSD).

Cheers,
Kazuyuki

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ezequias Rodrigues da Rocha 2006-11-16 14:54:02 Apoie o estudo das células tronco
Previous Message Jonah H. Harris 2006-11-16 13:18:00 Re: recursive SQL and with clause