From: | Alvaro Herrera <alvherre(at)atentus(dot)com> |
---|---|
To: | David Link <dlink(at)soundscan(dot)com> |
Cc: | Joseph Shraibman <jks(at)selectacast(dot)net>, PgSQL-General <pgsql-general(at)postgresql(dot)org>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: sql scripts |
Date: | 2002-01-23 03:00:15 |
Message-ID: | 1011754815.3685.58.camel@cm-lcon1-40-151.chello.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
El jue, 20-12-2001 a las 16:48, David Link escribió:
> Joseph Shraibman wrote:
> >
> > FYI anyone who wants to have a psql shell script:
> >
> > #!/bin/bash
> > tail +4 $0 | /usr/local/pgsql/bin/psql -U postgres -d playpen
> > exit
> >
> > select version();
>
> Very cool. And very clever. Thanks.
It should be possible to do things like
#!/usr/local/bin/psql -U someuser -d dbname
select version();
But the current psql implementation doesn't allow that for various
reasons. I don't know if it can be "fixed"...
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Tiene valor aquel que admite que es un cobarde" (Fernandel)
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Shraibman | 2002-01-23 03:12:59 | Re: sql scripts |
Previous Message | Bruce Momjian | 2002-01-23 02:31:57 | Re: detecting deadlocks |