Postgresql Logo

Welcome to BiggerSQL Help

Help for Postgresql SQL Commands.

Help for each of the postgresql commands is located here.

Using the Program.

Using BiggerSQL is easy. When the program opens you will be asked to log into a postgresql database. After a successful login you will be able to use the main window to enter SQL commands to the postgresql database. The main window is divided into three panels. The top panel is where the SQL is entered.The next panel displays success and failure messages. The bottom window is used to show the results of a successful selection command.

The Info button on the bottom left of the main window will toggle open a drawer that will show an outline view of the names and properties of all of the tables that the logged in user owns.

Entering and Executing SQL Code

You may enter more than one SQL statement in the top pane (seperated by semicolons). The statements can span any number of lines. There are a number of options to execute the code.
  • Pressing command-r will cause the current selected text to be send to Postgres one statement at a time. If no text is selected then the entire contents of the window is executed.
  • Clicking the Run button at the bottom right of the main screen has the same effect as the command-r sequence.
  • Shift-Return or the Enter key will also cause any selected text to be executed. If there is no text selected, the line containing the cursor will be sent to the postgresql server.
IMPORTANT: The program splits the input on semicolons, then each part of the split is sent to the SQL processor. The algorithm for splitting the input is fairly simple minded. The input stream is examined and each time a single quote is found, the "state" of the analyzer changes from "being in a quoted string" to "not being in a quoted string" (or the reverse). Semicolons are deemed to be statement separators if they are found while the parser is in the "not in a quoted string" state. This means you should not use the construct: '....\'...' but rather '...''...' i.e. represent a quote by two consequtive quotes within a quoted string. Note that if you have a single SQL statement you do not need to terminate it with a semicolon.

Version 1.1 Additions March 4, 2004

This version adds "drag and drop" utility to BiggerSQL. The user can drag a text file ( no checks are made ) to the SQL edit window and the window will be set to the contents of the file. The program can also be started by dragging a text file onto the BiggerSQL icon. BiggerSQL will be started with the contents of the file visible in the SQL editor window but the user will still have to log in before any commands will be executed.

Version 1.2 Additions March 7, 2004

All Tables and Views are now available in the info drawer. Double clicking on a table/view item in the info drawer will cause the editor window to be cleared and the table/view to be displayed in the query results window. Two major memory leaks were discovered and fixed.

Version 1.2.1 Additions March 8, 2004

Added a "Show System Files" menu item to the File menu. Choosing this menu item toogles between showing the user created tables/views and all of the tables in the user catalog.

Version 1.2.2 Additions March 9, 2004

This version adds a script menu. During startup BiggerSQL looks for the directory ~/Library/BiggerSQL. If it is not present the directory is created. If the directory exists, it is scanned and any file ending with ".sql" will generate a menu item having the file's name in the Scripts menu. The user is encouraged t o save their favorite sql scripts in this folder. Selecting such an item will cause the editor window to be replaced with the contents of the file. The first item in the Scripts menu is "Open Script Folder". Choosing this item will cause the scripts folder located in the users Library directory to be opened by the Finder and made the front most window. The user could then drag files from this window onto the editor window.

Version 1.2.3 Additions March 16, 2004

I have added hooks to the PQprint function. The options dialog in the "Save Query Results..." menu now has three tab views. The first tab "CSV Format" will allow the user to specify a number of options for saving a file is the CSV format. The second table "Aligned Text" allows the user to generate a more nicely formatted output in which the text is neatly aligned in columns. The "Expanded Tables" option will print the result set in two columns, the first is the field name and the second is the field value. The third tab "HTML" generates an html table containing the result set. The user may specify a "Table Caption" and also specify html elements that will control the table tag. The latter two tags directly call the postgresql PQprint function, so what you see is what you get. The "Save Editor Window..." menu item allows the user to save the contents of the editor window.

Version 1.2.4 Additions June 12, 2004

I cleaned up a big memory leak in the outline view window. A bug in the relogin procedure that caused the script menu to be improperly rebuild was fixed. The File menu has a new item "Visually Display NULL fields". When checked, "<NULL>" is displayed in every field that is null in the results window, when unchecked the field is filled with the empty string. There are several changes with the Scripts menu. The Script menu will now will construct submenus matching the directory structure of the Script Folder. When an item is selected from the Scripts menu, the path name of the script will be inserted at the top of the editor panel as a sql comment. The Script menu now has an item "Update Script Menu". When selected, this item will cause the Script menu to be rebuilt. Execution time in milliseconds is now displayed in the Status window.

Version 1.2.5 Addition Jul 18, 2004

Version 1.2.5 released. The last successful login information will now be saved ( but not the password). If the login is successful, a welcome message will appear in the status area. The user can choose to send the selected parts of the editor to the postgresql backend one statement at a time or the whole selection in one shot by selecting the "Send Single Statements" menu item in the File menu. If "Send Single Statements" is checked the program will attempt to split the selected sql into individual statements and send them one at a time, if unchecked the statements will be sent as a single transaction. The user can now select the font and size for both the editor window and the results window. The new choices will become the default choices until changed again by the user.

Confessions.

BiggerSQL is nothing more than an enhanced version of BigSQL which was released by the good folks at BigNerdRanch. I have included the SQL html help files from the Postgresql 7.4 distribution.

This software comes with absolutely no warranty. Feedback,enhancement suggestions or error fixes can be send to my mail . I will try to keep the latest version in my Cocoa program section at my homepage.

Enjoy,

Jerry LeVan