define the enum like this CREATE TYPE mood AS ENUM
('sad', 'ok', 'happy'); then use it as if it
were a built-in type. It sorts in ordinal order. You set the values with
ordinary Strings. The total length of all the
possible values must be ≤ 63, a severe
restriction. Postgre enums behave both like java
enums and EnumSets.
There are set SET('fragile', 'oversize',
'express')

Unfortunately, the names are not the same names as Java uses. Postgres predates
Java.

Gotchas

The biggest gotchas is that you must manually install some set environment
parameters. If you don’t, PostgreSQL will reject your password.

File names must use /s not \s. e.g. \i
E:/com/mindprod/mother/mboards.sql to run a script. If you forget, you will
get a permission denied message.

There is no SQLUSE command, so you must
enter the dbname on the dbcreate or psql command line, or the DriverManager.getConnection statement.
You can enter SQL commands at the psql.exe
command line switch:

psql -d dbname -U username --help

You can get it to explain the syntax with --help, \h and \?
help commands.

To create a database.

createdb -E UTF-8 -e quotedb

Createdb then sends the following command to the database server:

CREATE DATABASE quotedb ENCODING 'UTF-8';

To import SQL command files:

psql -f some.sql

You can import data from a CSV (Comma-Separated Value) file with the following SQL command:

COPY tablename FROM 'somefile.csv' CSV NULL AS '--' ;

There are many other COPY options. By default the delimiters are , and " .
. Like Java, SQL distiguishes between a null field and an empty field.

The SHOW command does almost nothing. Use \d instead to get information about tables.

When you install a new version, it may tell you the new format is incompatible
with the old one. It is up to you to somehow get the data out of your old database
and reload it into you new one.

The command you need to exit the interactive command processor is not obvious
\q.

Postgre is royal pain when it comes to passwords.

You must key them blind.

You may not paste them in.

You may not insert them with PassWord Safe.

You may not specify them on the command line, inserting from SET parameters.

It is unclear how the SET parameters and what you type during the install interact to set the passwords.

There does not appear to be a way to change the password or change the userid other than uninstalling and reinstalling.

There are no password hints.

So you have have to pick a short, insecure password.

It offer to install a dozen extra packages, but gives you no clue what they are for.