https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04
http://stackoverflow.com/questions/11919391/postgresql-error-fatal-role-username-does-not-exist
http://stackoverflow.com/questions/17633422/psql-fatal-database-user-does-not-exist
http://stackoverflow.com/questions/15591749/unable-to-create-user-postgres-role-postgres-does-not-exists
http://stackoverflow.com/questions/11919391/postgresql-error-fatal-role-username-does-not-exist
http://suite.opengeo.org/4.1/dataadmin/pgGettingStarted/firstconnect.html
http://nanvel.com/
http://askubuntu.com/questions/122428/how-to-run-sh-file
http://hexvolt.blogspot.com/2012/11/postgresql-91-ubuntu-1204.html
sudo -i -u postgres
sudo -u postgres createuser pivopil
1902 psql
1903 psql createdb pivopil
1904 createdb pivopil
1905 psql
1906 psql -h localhost
1907 psql
1908 psql -h localhost
1909 psql
1910 createdb pivopil
1911 sudo createdb pivopil
1912 psql -d template1
1913 sudo -u postgres createuser pivopil
1914 psql
1915 sudo createdb pivopil
1916 createdb pivopil
1917 psql
1918 ls
1919 history
for pivopil role
jdbc:postgresql://localhost:5432/pivopil
pivopil
1
create table "FAVOURITE" ("FAVOURITE_NAME" VARCHAR(254) NOT NULL,"FAVOURITE_ID" INTEGER NOT NULL PRIMARY KEY);
create table "MOVIE" ("THE_MOVIE_DB_ID" INTEGER NOT NULL,"FAVOURITE_ID" INTEGER NOT NULL,"MOVIE_NAME" VARCHAR(254) NOT NULL,"ID" INTEGER NOT NULL PRIMARY KEY);
alter table "MOVIE" add constraint "FAVOURITE_ID" foreign key("FAVOURITE_ID") references "FAVOURITE"("FAVOURITE_ID") on delete CASCADE;
========
ALTER ROLE pivopil WITH SUPERUSER;
CREATE CAST (text AS json) WITH FUNCTION json_intext(text) AS IMPLICIT;
ALTER ROLE pivopil NOSUPERUSER;
// uninstall
https://askubuntu.com/questions/32730/how-to-remove-postgres-from-my-installation
// backup
http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql/
No comments:
Post a Comment