Ubuntu/postgres

From r00tedvw.com wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "==Login as root== <nowiki>~$ sudo su - postgres ~$ psql postgres=#</nowiki> ==List databases== ====List all DBs==== <nowiki>postgres=# \list -OR- \l</nowiki> ====List all t...")
 
 
Line 9: Line 9:
 
====List all tables in current DB====
 
====List all tables in current DB====
 
  <nowiki>postgres=# \dt </nowiki>
 
  <nowiki>postgres=# \dt </nowiki>
 +
 +
==Connect to DB==
 +
<nowiki>postgres=# \connect <database name></nowiki>

Latest revision as of 15:58, 5 June 2015

Contents

[edit] Login as root

~$ sudo su - postgres
~$ psql
postgres=#

[edit] List databases

[edit] List all DBs

postgres=# \list -OR- \l

[edit] List all tables in current DB

postgres=# \dt 

[edit] Connect to DB

postgres=# \connect <database name>
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
2020 Election
Volkswagen
Covid
NCDMV
Toolbox