What type of PostgreSQL setup is used ?
Each account has its own postgresql server, which he manages.
You can create any number of postgresql users, databases.
You also control access methods to the postgresql server.
Can I use both MySQL and PostGreSQL in the same account ?
Yes, you can use both at the same time. On rootr.net, mysql and
postgresql system don't interfere with each other at all.
You can even use them both inside one program or script.
How many database can I create under PostGreSQL ?
There is no arbitrary limit on the number of datbases you can create.
You have full administrative access to your own postgresql server.
Major programming languages and PostGreSQL on rootr.net:
rootr.net has already set up to use postgresql interface libraries.
Other programming languages would use the same settings.
Ruby: Ruby postgres and ruby/DBI with DBD/pg.
Perl: use DBI; (itself using DBD::Pg) modules. man DBI.
PHP: build-in standard postgres extensions for PHP4 and above.
Python: py-psycopg, and py-psycopg-zope.
C and C++: Native postgresql libraries.
Shell commands:
The psql command for SQL client interface.
The createdb, dropdb
commands for database creation.
The createuser, dropuser
commands to add and delete users.
The initdb, pg_ctl
and postmaster commands for administration.
All have associated man pages.
SSH tunnels can be created freely, for remote access security.
How to setup PostGreSQL in my Account ?
From the shell, type the command: install_pg
That's it. Alternatively, shoot an email to support.
I know already about postgresql, what does install_pg do ?
How to create PostGreSQL users ?
When PostGres is installed in your account, there is a default
user with the same name as the account (login) name.
You can create additional users with the createuser command:
createuser <new-user-name> . see man createuser
For details on options to create user from the shell, in particular the
-p and -d options.
From SQL: CREATE USER <new-user-name>. inside
psql, see \h CREATE USER for details.
This same SQL command can be used within applications and programs.
Changing PostGreSQL users password
This SQL command change a specific user's password:
ALTER USER [user name] WITH PASSWORD '[new password]'
If you have not created users yet, put your main login name for [user name].
I want to install a PostGreSQL manually, on my own
No problem. the script above is just convenience.
Here are quick-steps to install your own postgresql server on your own:
initdb -D pg port = NN export PGPORT=NN. setenv PGPORT NN. pg_ctl -D pg -l pg/log start createdb test psql test
crontab -e , then add the line: @reboot /usr/local/bin/pg_ctl -D $HOME/pg -l pg/log start >/dev/null 2>&1 export VISUAL=/usr/local/bin/uemacs
links /usr/local/share/doc/postgresql/html/index.html
After installing PostGreSQL with install_pg automatically, can I edit it ?
Yes, install_pg is non-interfering, and automate only the installation process.
once it is installed, you can change anything in postgresql as if it was
installed manually.
Removing a PostGreSQL server entirely
To uninstall all this, do the following in the home directory:
(replace "pg" with wherever you installed it)
pg/stoppg_ctl -D pg stopkill -9 `cat pg/postmaster.pid` (backstick quotes).
rm -r pg
@reboot pg/start, if there's any.