14
Practice
1. Set the work_mem parameter to 8 MB in the postgresql.conf file.
Reload the server configuration and check that the changes have 
come into effect.
2. Create a file called ddl.sql. In this file, write the CREATE TABLE 
command that creates an arbitrary table.
Create another file called populate.sql; it should contain some 
commands that insert rows into this table.
Start psql, run both scripts, and check that the table is created and 
contains the specified rows.
3. Find today’s entries in the log file.
To do practical assignments, you have to log in to the operating system on 
behalf of the student user (the password is student).
Start psql in the terminal by typing psql, without parameters. The connection 
will be established with the default settings.
student:~$ psql
It is convenient to have separate databases for tasks that are related to 
different topics. Let's create one:
student/student=# CREATE DATABASE tools_overview;
CREATE DATABASE
student/student=# \c tools_overview
You are now connected to database "tools_overview" as 
user "student".
student/tools_overview=# 
Task 1. You can use any text editor. The virtual machine provides 
mousepad, gedit, vim, nano.
Note: if you launch an editor from the GUI environment instead of the 
terminal, it will be started on behalf of the student OS user.