Re: scripting & psql issues

From: "Bob Parkinson" <rwp(at)biome(dot)ac(dot)uk>
To: <pgsql-general(at)postgresql(dot)org>, <dino_vliet(at)yahoo(dot)com>
Subject: Re: scripting & psql issues
Date: 2004-08-18 15:26:48
Message-ID: s1238356.089@ccw0m1.nottingham.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've started to use the "here document" idea a lot when writing scripts to do tasks.

#!/usr/local/bin/bash

psql -d myDB <<EOSQL

select foo ....
update bar;
delete from ...

EOSQL

Bob

This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2004-08-18 15:30:05 Re: [ADMIN] SRPM for 8.0.0 beta?
Previous Message Mitch Pirtle 2004-08-18 15:25:54 Re: tracking db changes / comparing databases