PostgreSQL: Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 20: Zeile 20:


<pre>
<pre>
CREATE DATABASE <database name>
</pre>


</pre>
==== Links ====
 
[https://www.postgresql.org/docs/9.0/sql-createdatabase.html https://www.postgresql.org/docs/9.0/sql-createdatabase.html]


=== Umbenennen ===
=== Umbenennen ===

Version vom 9. Juni 2019, 15:42 Uhr

Backup erstellen und Restore

pg_restore -c -C <filename>

Links

https://www.postgresql.org/docs/9.1/backup-dump.html

http://postgresguide.com/utilities/backup-restore.html

https://www.postgresql.org/docs/9.3/app-pgdump.html

https://dba.stackexchange.com/questions/161857/how-to-backup-restore-in-postgresql-pgadmin-4

Datenbanken

Erstellen

CREATE DATABASE <database name>

Links

https://www.postgresql.org/docs/9.0/sql-createdatabase.html

Umbenennen

ALTER DATABASE db RENAME TO newdb;

Bei Bindestrichen im Namen den Namen in Anführungszeichen setzen z.B.: "pre-name"

Links

http://www.postgresqltutorial.com/postgresql-rename-database/

Login (mit Passwort)

psql -d database -U user -W

Passwort ändern

psql -d database -U user -W
\password

Links Allgemein

http://www.postgresqltutorial.com/psql-commands/

http://www.postgresqltutorial.com/


Zurück zu Allgemein