Escort Tools Suite Help
Overview
This software is a graphical tool suite for the PostgreSQL database.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The Query Tool
This tool is a graphical user interface for querying PostgreSQL. The main goals of this tool are
to provide an easy way to execute SQL batch.
Connection
In order to connect to a PostgreSQL database, you select menu file and click New Connection.
Then a popup window appears. You need to fill the following fields.
Field Name |
Description |
Host (1) |
server name (ex:localhost) or unix socket (ex:/tmp). |
Host IP |
IP address of the server. format xxx.xxx.xxx.xxx (ex: 127.0.0.1). |
Port |
port for PostgreSQL. defaut is 5432. |
Database |
name of the database (ex:test, prod). |
Login |
user name referenced in the database. |
Password |
password to connect to the database. |
Then click on the Connect button.
(1) You have to fill either Host or either Host IP.
Some parameters can be automatically filled, see paragraph about the configuration options.
If you have some problems to connect (Connection Error), here are some hints :
- Are the login, the password and the database name correct ? Try to connect with pgsql.
- Does the ping work ?
- Is the port good ? Check on the server with 'fgrep postgres /etc/services'.
- If you use non local connection, check config file pg_hba.conf (can distant clients connect ?). If you use tcp/ip, is the parameter tcpip_socket is set to true ?
Executing a batch query
A batch is a collection of sql queries separated by ;.
Batch examlple :
DROP SEQUENCE dvd_seq;
DROP TABLE dvd;
CREATE SEQUENCE dvd_seq;
CREATE TABLE dvd (
dvd_id INT DEFAULT nextval('dvd_seq') PRIMARY KEY,
title VARCHAR(50) NOT NULL,
zone SMALLINT NOT NULL
);
INSERT INTO dvd (title, zone) VALUES ('The Big Lebowski',1);
SELECT *
FROM dvd;
|
To execute a query or a batch, select menu File and the click Execute or use CTRL-E.
See paragraph about configuration options to modify behaviour for execution.
Settings
General
Option |
Description |
Show ToolBar |
enable/disable ToolBar |
Batch Execution
Option |
Description |
AutoSwitch to result |
If this option is enabled, when the first query is executed, the view change to the output view. |
Batch Execution Continue on error |
If this option is enabled, the error are ignored. You can use it for developpment : for example,
you can drop a table and the create it. |
Prompt for showing result with more than n rows |
If this option is enabled and if the recordset have more than n rows, a dialog window appears
and ask you if you want to see the rows. |
Clear notices window for each batch execution |
If this option is enabled, then each time a query/batch is executed,
a notice view/message log is cleared.
|
SameFileSaveLoad |
If you enable this option, when you open a query/batch file and after save it, the query/batch file
will be save in the same file as the file you opened. |
Set configuration for the new views with the configuration of the last view created |
If this option is enabled, then some parameters of the last view created (size) are used
to set the one of the new view. |
Connection
Option |
Description |
|
|
Fill connection parameters with PG Environment variable |
If this option is enabled, the connection fields are filled with environnement variables
PGHOST, PGHOSTADDR, PGPORT, PGUSER, PG_DATABASE |
Fill login with unix login |
If this option is enabled, the login is filled with the GNU/Linux login. |
Fill connection parameters with the parameters of the last created connection |
All the fields except the password field are set with the value of the previous connection. |