PostgreSQL Cookbook: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:
The PostgreSQL service name includes the version number.  
The PostgreSQL service name includes the version number.  


With powershell, find the name of the service:  
With powershell run with Administrator privileges, find the name of the service:  


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">

Revision as of 01:59, 21 March 2015

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 run with Administrator privileges, 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