--- /dev/null
+<html>\r
+\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">\r
+<link rel="STYLESHEET" type="text/css" href="pgadmin3.css">\r
+<title>Graphical Query builder</title>\r
+</head>\r
+\r
+<body>\r
+\r
+<h3>Graphical Query Builder</h3>\r
+\r
+<center><img src="images/gqb.png"></center>\r
+\r
+<p>The Graphical Query Builder (GQB) is part of the <a href="query.html">Query\r
+Tool</a> which allows you to build simple SQL queries visually.</p>\r
+\r
+<p>There are three main parts of the GQB. The relation browser on the left\r
+hand side allows you to select catalogs, classes and views to include in \r
+your queries. Along the bottom are a set of tabs which allow you to specify\r
+selection criteria, output format and sorting. The third section is the \r
+canvas on which you draw the relationships between the relations in your\r
+tables. You can adjust the relative size of each section by dragging the\r
+join (or sash) between the panes.</p>\r
+\r
+<p>To add relations to the query, either double click them in the relation\r
+browser, or drag them from the browser onto the canvas. You can arrange relations\r
+on the canvas by selecting the relation name with the mouse and moving the relation\r
+to the desired position.</p>\r
+\r
+<p>To create joins between relations, drag a column from one relation onto \r
+another. A line will be drawn between them to indicate the join. Right-clicking\r
+the join will present a popup menu from where you can select the join operator\r
+or delete it.</p>\r
+\r
+<p>To select the columns that will appear in the query results, check the desired\r
+columns within the relation on the canvas. Each column selected will be added to\r
+the list on the Columns tab on which you can adjust the ordering, and specify\r
+column aliases.</p>\r
+\r
+<p>To specify selection criteria, add rows to the grid on the Criteria tab. The\r
+restricted value can be set to a column name, or a constant value. The Operator \r
+column allows you to select a simple operator to be used to compare the restricted \r
+value with the value specified in the Value column. The Connector specifies how\r
+the criteria will be joined to the next (if any).</p>\r
+\r
+<p>The query results may be ordered on the Ordering tab. Select the columns\r
+required on the left, and use the buttons in the middle to add them to the\r
+ordering list on the right. You can also remove columns in the same way. \r
+For each column added to the ordering list you can specify the sorting\r
+direction. You can also adjust the priority of each ordering column by\r
+selecting it, and moving it up or down the list using the buttons on the \r
+right.</p>\r
+\r
+<p>When you have designed your query, you can use the Execute, Execute to File,\r
+or Explain options on the toobar (and Query menu) to generate and execute the \r
+query.</p>\r
+\r
+</body>\r
+</html>\r
<center><img src="images/query.png"></center>
-<p>The Query Tool enables you to execute arbitrary SQL commands. All
-rules that are mentioned in the PostgreSQL User's guide apply.
-</p>
-<p>The upper part of the Query Tool contains the edit entry window,
+<p>The Query Tool enables you to execute arbitrary SQL commands.</p>
+
+<p>The upper part of the Query Tool contains the SQL Editor
where you type your commands. You may read the query from a file, or
write it out to a file. When writing a file, the encoding of the file
is determined by the file suffix: if it is *.sql, a 8 byte local
the autocomplete feature as well - the can be done on the
<a href="options-tab3.html">options dialog</a>.</p>
+<p>If you prefer to build your queries graphically, you can use the
+<a href="gqb.html">Graphical Query Builder</a> to generate the SQL
+for you.</p>
+
<p>To execute the query, you select Execute from the Query menu, or
you press the execute toolbar button, or you press the F5 function
key. If you didn't select a word, the complete contents of the window