Executing custom SQL commands
Webmin provides a simple interface to your Postgres database server, which allows you to execute arbitrary SQL commands. This can be a useful feature when you want to quickly find something in a database or perform a bulk update of multiple rows of data.
How to do it...
Perform the following steps to execute custom SQL commands:
Navigate to Servers | PostgreSQL Database Server.
Click the icon that represents the database you would like to use.
Click the Execute SQL button.
Enter SQL commands in the text area, for instance:
CREATE TEMPORARY TABLE IF NOT EXISTS films ( title varchar(40) ); INSERT INTO films(title) VALUES ('Bananas'), ('Yojimbo'); SELECT * FROM films;
Click the Execute button.
You will be presented with a sortable display of data returned by the SELECT
command. The presented data will come from a temporary films
table created by the first command. Temporary tables are not stored when the client who created them disconnects, so you will not see this...