From: | "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net> |
---|---|
To: | James Pye <jwp(at)rhid(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: persistant psql feature suggestion |
Date: | 2003-06-27 17:44:44 |
Message-ID: | 1056735884.6032.7.camel@zeutrh9 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2003-06-27 at 03:21, James Pye wrote:
> Greets,
>
> Just a thought for a psql enhancement, afiak, it is not easily possible for persistent connections to a database in a shell script..
> The ability for psql to remain in the background reading from stdin and writing to stdout until explicitly killed. More specifically, so a shell scriptor can have "persistent" connections to the database by calling psql once(leaving it in the bg), and redirecting stdio through a fifo(mkfifo)(sending queries by echo > fifo, and fetching results by cat fifo).
> When I have tried this in the past it will read the query, execute it, and exit when the results are cat'd from the fifo.
Not sure if it's exactly what you are looking for, nor how well it's
still maintained, but....
I believe there is a took out there called pgbash which is a modified
version of bash that understands database queries natively. I think
it's just what you are looking for.
Check out: http://www.psn.co.jp/PostgreSQL/pgbash/index-e.html
Looks like it was updated for 7.3
Matthew
From | Date | Subject | |
---|---|---|---|
Next Message | Aizaz Ahmed | 2003-06-27 18:21:27 | Re: pg_guc |
Previous Message | Darko Prenosil | 2003-06-27 16:48:35 | Re: .pot files are unavailable (?) |