Skip to content

Commit

Permalink
vault backup: 2024-05-16 12:19:39
Browse files Browse the repository at this point in the history
Affected files:
content/.obsidian/plugins/recent-files-obsidian/data.json
content/postgresql/Install PostgreSQL on WSL 2 (Ubuntu).md
content/postgresql/PostgreSQL Databases.md
content/postgresql/PostgreSQL Insert and Import.md
content/postgresql/PostgreSQL Tables.md
  • Loading branch information
windsuzu committed May 16, 2024
1 parent e55093c commit 23a4388
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions content/.obsidian/plugins/recent-files-obsidian/data.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"recentFiles": [
{
"basename": "Install PostgreSQL on WSL 2 (Ubuntu)",
"path": "postgresql/Install PostgreSQL on WSL 2 (Ubuntu).md"
},
{
"basename": "PostgreSQL",
"path": "postgresql/PostgreSQL.md"
Expand All @@ -28,6 +24,10 @@
"basename": "Connect PostgreSQL on WSL 2 (Ubuntu)",
"path": "postgresql/Connect PostgreSQL on WSL 2 (Ubuntu).md"
},
{
"basename": "Install PostgreSQL on WSL 2 (Ubuntu)",
"path": "postgresql/Install PostgreSQL on WSL 2 (Ubuntu).md"
},
{
"basename": "index",
"path": "index.md"
Expand Down
2 changes: 1 addition & 1 deletion content/postgresql/Install PostgreSQL on WSL 2 (Ubuntu).md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
draft: false
date: 2024-05-15 16:20
date: 2024-05-16 11:48
tags:
- postgres
---
Expand Down
6 changes: 3 additions & 3 deletions content/postgresql/PostgreSQL Databases.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
draft: false
date: 2024-05-15 16:44
date: 2024-05-16 11:48
tags:
- postgres
---
Expand All @@ -16,7 +16,7 @@ CREATE DATABASE name_of_db;
### List all DBs

```sql
```bash
\l

# List of databases
Expand All @@ -29,7 +29,7 @@ CREATE DATABASE name_of_db;
```
### Go to a DB

```sql
```bash
\c name_of_db

postgres=# \c test
Expand Down
4 changes: 2 additions & 2 deletions content/postgresql/PostgreSQL Insert and Import.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
draft: false
date: 2024-05-16 00:50
date: 2024-05-16 11:49
tags:
- postgres
---
Expand Down Expand Up @@ -35,7 +35,7 @@ insert into person (first_name, last_name, email, gender, date_of_birth) values

You need to first get the relative path of the SQL file, then paste it into `psql`.

```sql
```bash
pwd
# /mnt/c/Users/winds/Desktop

Expand Down
8 changes: 4 additions & 4 deletions content/postgresql/PostgreSQL Tables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
draft: false
date: 2024-05-15 18:01
date: 2024-05-16 11:49
tags:
- postgres
---
Expand Down Expand Up @@ -42,7 +42,7 @@ CREATE TABLE person (

Use `\d` to display all relations (tables and sequences) in the current database.

```sql
```bash
\d

# List of relations
Expand All @@ -54,7 +54,7 @@ Use `\d` to display all relations (tables and sequences) in the current database

Use `\dt` to display all relations that are table type.

```sql
```bash
\dt

# List of relations
Expand All @@ -66,7 +66,7 @@ Use `\dt` to display all relations that are table type.

And use `\d table_name` to see the details of the specified table.

```sql
```bash
\d person

# Table "public.person"
Expand Down

0 comments on commit 23a4388

Please sign in to comment.