University of Florida :: Department of Computer and Information Science and Engineering (CISE)

CISE Help & Resources

PostgreSQL

Postgres Documentation

Registering for a Postgres Account

To sign up for a CISE Postgres account, you will need to register for one using the the Postgres Account Registration Page. The page can also be used to set a new password for an existing Postgres account if you have forgotten your password.

Postgres accounts are now autocreated. You should receive mail to your CISE address within a half an hour of registration. If you do not, send mail to and let us know.

You will need to supply the following information on the registration page:

CISE Username
Enter your CISE username
CISE Password
Enter your CISE password
Postgres Password
Select a password for you postgres account and enter it here. The password must meet the following criteria:
  • The password must be 7 or 8 characters long (only the first 8 are used).
  • The password must contain at least one letter (this stops things such as special dates, SSN, phone numbers, etc. from being used).
  • At least 2 of the characters must be a special character or digit. At least 1 of these must be a special character (non-alphanumeric). The first character must not be a dash (-).
  • The password must not contain your username.
  • You should avoid starting with a single word and then doing common 1-character replacements such as replacing 'i' with 1 or 'a' with '\@'. Some of these will fail the good password check.
Verify Postgres Password
Enter your Postgres password again. It must match the first time.
Class
Currently, there is only one 'class' for Postgres accounts, project accounts

Connecting to Postgres

All connections to the server postgres.cise.ufl.edu are host restricted. You must connect to postgres.cise.ufl.edu from a *.cise.ufl.edu domain. (for example: CISE lab machines, sun01, storm and thunder). Wireless connections from within the CISE building do NOT have a *.cise.ufl.edu domain, and can not connect to Postgres.

If you need to connect to Postgres from a non *.cise.ufl.edu computer, you can ssh to one of the remotely accessable CISE machines (sun01, storm, and thunder) and connect from there.

Using pSQL on the Unix Command Line

Using pSQL on the command line is simple:

From CISE:

psql -h postgres.cise.ufl.edu projectdb

To connect to Postgres from outside UF you will need to establish a Gatorlink VPN connection.:

psql -h postgres.cise.ufl.edu -U username projectdb

Read the psql man page for more info.

Generic Postgres Connection Parameters

If you're using an Postgres client and need to specify the paramters, use the following for Postgres accounts:

Server :    postgres.cise.ufl.edu
Port   :    5432
dbname :    projectdb

Using JDBC with Postgres

The Java-Postgres Example shown here can be compiled with

javac -classpath /usr/local/java/classes/postgresql.jar:. Pg.java

and run with

javac -classpath /usr/local/java/classes/postgresql.jar:. Pg.java

PHP and Postgres DB Connections

PHP (/usr/local/bin/php) now supports Postgres. Please see the manual here. Postgres support is discussed here

A quick PHP exmple using postgres is available here.

Using Perl/DBI with Postgres

To use Postgres in perl, use the DBD::Postgres module. Relevant documentation are in the man pages for DBI and DBD::Pg.

A short Perl example using DBI is here.

Using Ruby/DBI with Postgres

For anyone interested in using the Ruby language, there's also support for Postgres in Ruby on CISE systems, using a DBI module modelled after the perl DBI scheme.

A short ruby example using Postgres/DBI can be found here.

Feedback