Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

PostgreSQL

Additional instructions

Windows

Download and install Postgre togahter with pgAdmin and StackBuilder.

Username: postgres
Password: Your-Choice

Linux

$: sudo apt-get update
$: sudo apt-get install postgresql-X
# Note: if you get an error "Could not get lock..." then just wait a few minutes for apt to finish or consult the web page below
# Note: restart OS
$: createdb _username  # check installation
# Note: if you get an error "...role _username does not exist" then you will need to create a role first
# Note: create a PostgreSQL role
$: sudo -i -u postgres
$: createuser --interactive
  # Enter name of role to add: _username
  # Shall the new role be a superuser? (y/n) y
# Note: PostgreSQL roles are separate from Linux usernames
# Note: go back and create a database with the same username
# Note: when you have a role and a database
$: psql
  # \q  # quit
$: conda search psycopg2
$: conda install psycopg2
$: SELECT version();
$: SELECT current_date;
$: SELECT 2 + 2;
$: \h
$: \q

TODO