PostgreSQL Cookbook

From Littledamien Wiki
Revision as of 00:36, 21 March 2015 by Video8 (talk | contribs)
Jump to navigation Jump to search

Installation on Windows

Search for the "PostgreSQL Windows". There is an installer available. It's pretty straightforward.

Creating a database

Use the pgAdmin III program.

  • First create a Login Role for the database. Set the database's owner to the new (or existing) login role:
    Object browser > Server Groups > [server] > Login Roles > (right click) > New Login Role
  • Create the database
    Object browser > Server Groups > [server] > Databases > (right click) > New Database

Restarting the service

The PostgreSQL service name includes the version number.

With powershell, find the name of the service:

> get-service

Find the postgresql instance. Then stop and start the service:

> net stop postgresql-9.4
> net start postgresql-9.4