Intro Postgreql

De WikiEducator
Saltar a: navegación, buscar




Icon preknowledge.gif

Primeros pasos

 sudo apt-get install postgresql pgadmin3
 sudo -u postgres psql
 /password




sudo -u postgres createuser myusername
Shall the new role be a superuser? (y/n) y

createdb book
psql book -c "CREATE EXTENSION tablefunc" 
ERROR:  could not open extension control file "/usr/share/postgresql/9.1/extension/tablefunc.control": No such file or directory
sudo apt-get install postgresql-contrib 
psql book -c "CREATE EXTENSION tablefunc" 
psql book -c "CREATE EXTENSION fuzzystrmatch" 
psql book -c "CREATE EXTENSION pg_trgm" 
psql book -c "CREATE EXTENSION cube" 
psql book -c "CREATE EXTENSION dict_xsyn"