PDA

View Full Version : Can query 'strings' be saved inside pgAdmn III ?



_Loki_
02-20-2010, 02:40 PM
pgAdmin III > Tools > Query tools > SQL Editor tab/pane

& then type 1] or 2] below & press F5
1] Select Count(*) from pokerhands
2] SELECT pokersites.sitename,count(*) FROM pokerhands LEFT JOIN pokersites ON pokerhands.site_id = pokersites.site_id GROUP BY pokersites.sitename

To save time & typing errors I have queries 1] & my version of 2] saved in a doc to copy/paste into SQL Editor when I want # of hands info

QUESTION:
Is there a way of saving queries 1] & 2] INSIDE pgAdmin III so I can run them without having to copy/paste the queries each time ?

morny
02-20-2010, 04:47 PM
Yeah just go to file > save

_Loki_
02-20-2010, 09:37 PM
Hi M


Is there a way of saving queries... INSIDE pgAdmin III so I can run them without having to copy/paste the queries each time ?

I just tried your suggestion & I don't get your meaning:
file > save

It seems to just give me the option to save the query OUTSIDE pgAdmin III in a doc
To run the query again I still have to open the doc wherever I've saved it & copy/paste contents into the pdAdmin III query pane
Perhaps you have something set up in preferences (or whatever) different from me ?

netsrak
02-21-2010, 07:15 AM
The Query tool (SQL Editor) has standard file->save and other options in the main window menu.

See this for example (its an older version but should be the same): pgAdmin Query Tool (http://www.pgadmin.org/docs/1.4/query.html)

_Loki_
02-21-2010, 10:49 AM
I want to save commands INSIDE pgAdmin III
Anyway - I did some experimentation & the answer is...

I can save commands >>>>> INSIDE <<<<< pgAdmin III by using the Favourites menu built into the query tool page menu bar (in 8.4) & save favourite commands there. Any other option just leads to saving it in a doc outside

NB. It has bugger all to do with file > save :)