Postgresql.vm.nurd.space

From NURDspace
Revision as of 12:08, 13 April 2013 by Smokeyd (talk | contribs)
NURDs Inventory
NoPicture.png
Owner The wikipage input value is empty (e.g. <code>SomeProperty::, [[]]</code>) and therefore it cannot be used as a name or as part of a query condition.
Status
Tool
Tool category

{{{Name}}}Property "Tool Name" (as page type) with input value "{{{Name}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} Space {{{Location}}}Property "Tool Location" (as page type) with input value "{{{Location}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.

postgres.nurdspace.lan

This is a PostgreSQL server. For documentation refer to [1]

Documentation

Just a few pointers about creating databases and authentication:

If you are logged in on the shell of a postgres machine, postgresql normally uses Ident authentication. This means that starting using postgresql command-line tools, logs you in as the postgresql user with the same name as your shell user.

To log in to the postgresql command-line tool with the postgresql equivalent of the root user (called postgres), execute

sudo -u postgres psql

By default you log-in to the database with the same name as your username. To log-in to a different database do:

sudo -u postgres psql -d <dbname>

Databases and users can be created with normal command-line tools. To create a user and database owned by it, do:

sudo -u postgres createuser -P <username>
sudo -u postgres createdb -U UTF8 -T template0 -O <username> <username>

It is best to create databases with the same name as the owner. This is due to pg_hba.conf. This file (in /etc/postgres/<version>/main/), defines which user is allowed to log-in to which database, from which host and with which method. By default, postgres allows the postgres user to log into any database, and users only from localhost into databases with the same name as their username when password authentication is used.

If you need username/password authentication from other hosts, add a line to pg_hba.conf, allowing it.