Re: [GENERAL] Storing Queries - Mailing list pgsql-general

From Ed Loehr
Subject Re: [GENERAL] Storing Queries
Date
Msg-id 38AA3683.263BA5AE@austin.rr.com
Whole thread Raw
In response to Storing Queries  ("Hambleton, John" <JHAMBLET@NMU.EDU>)
List pgsql-general
"Hambleton, John" wrote:
>
> Aloha!
>
> PostgreSQL newbie here!
> Can I store SQL queries after I have started "psql <database>"?
> If so, how is it done? How do I recall the query to use it again?

Aside from "up-arrow" to get previous lines in psql, I thought I saw
something called pgbash somewhere that I thought might possibly have
bash-like command-editing...you might checkout info at
www.postgresql.org.  Personally, I switch back and forth between
interactive psql (for big ad hoc cut-n-paste queries from logs), psql
-f filename (for long-standing repeated queries), and psql -c "query"
(for quick ad hoc queries I may want to repeat via bash command-line
editing...

Cheers,
Ed Loehr

pgsql-general by date:

Previous
From: "Hambleton, John"
Date:
Subject: Storing Queries
Next
From: Ed Loehr
Date:
Subject: Re: [GENERAL] Storing Queries