Skip to content

Commit

Permalink
vault backup: 2024-05-19 00:27:03
Browse files Browse the repository at this point in the history
Affected files:
content/.obsidian/plugins/recent-files-obsidian/data.json
content/.obsidian/workspace.json
content/postgresql/PostgreSQL Conflict.md
content/postgresql/PostgreSQL Join.md
  • Loading branch information
windsuzu committed May 18, 2024
1 parent e74838b commit e312635
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
16 changes: 8 additions & 8 deletions content/.obsidian/plugins/recent-files-obsidian/data.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"recentFiles": [
{
"basename": "PostgreSQL Conflict",
"path": "postgresql/PostgreSQL Conflict.md"
"basename": "PostgreSQL Join",
"path": "postgresql/PostgreSQL Join.md"
},
{
"basename": "PostgreSQL",
"path": "postgresql/PostgreSQL.md"
},
{
"basename": "PostgreSQL Update",
"path": "postgresql/PostgreSQL Update.md"
},
{
"basename": "PostgreSQL Delete",
"path": "postgresql/PostgreSQL Delete.md"
},
{
"basename": "PostgreSQL Update",
"path": "postgresql/PostgreSQL Update.md"
"basename": "PostgreSQL Conflict",
"path": "postgresql/PostgreSQL Conflict.md"
},
{
"basename": "PostgreSQL Constraints",
Expand Down Expand Up @@ -48,10 +52,6 @@
"basename": "PostgreSQL Table",
"path": "postgresql/PostgreSQL Table.md"
},
{
"basename": "PostgreSQL Join",
"path": "postgresql/PostgreSQL Join.md"
},
{
"basename": "Install PostgreSQL on WSL 2 (Ubuntu)",
"path": "postgresql/Install PostgreSQL on WSL 2 (Ubuntu).md"
Expand Down
16 changes: 8 additions & 8 deletions content/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"state": {
"type": "markdown",
"state": {
"file": "postgresql/PostgreSQL Conflict.md",
"file": "postgresql/PostgreSQL Join.md",
"mode": "source",
"source": false
}
Expand Down Expand Up @@ -102,7 +102,7 @@
"state": {
"type": "localgraph",
"state": {
"file": "postgresql/PostgreSQL Conflict.md",
"file": "postgresql/PostgreSQL Join.md",
"options": {
"collapse-filter": true,
"search": "",
Expand Down Expand Up @@ -152,7 +152,7 @@
"state": {
"type": "outline",
"state": {
"file": "postgresql/PostgreSQL Conflict.md"
"file": "postgresql/PostgreSQL Join.md"
}
}
},
Expand Down Expand Up @@ -193,7 +193,7 @@
"state": {
"type": "file-properties",
"state": {
"file": "postgresql/PostgreSQL Conflict.md"
"file": "postgresql/PostgreSQL Join.md"
}
}
},
Expand All @@ -203,7 +203,7 @@
"state": {
"type": "backlink",
"state": {
"file": "postgresql/PostgreSQL Conflict.md",
"file": "postgresql/PostgreSQL Join.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -220,7 +220,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "postgresql/PostgreSQL Conflict.md",
"file": "postgresql/PostgreSQL Join.md",
"linksCollapsed": false,
"unlinkedCollapsed": false
}
Expand Down Expand Up @@ -249,8 +249,9 @@
"active": "89b49aba37ae8848",
"lastOpenFiles": [
"postgresql/PostgreSQL.md",
"postgresql/PostgreSQL Delete.md",
"postgresql/PostgreSQL Join.md",
"postgresql/PostgreSQL Update.md",
"postgresql/PostgreSQL Delete.md",
"postgresql/PostgreSQL Conflict.md",
"postgresql/PostgreSQL Constraints.md",
"postgresql/PostgreSQL Primary Key and Foreign Key.md",
Expand All @@ -261,7 +262,6 @@
"postgresql/PostgreSQL Database.md",
"postgresql/PostgreSQL Table.md",
"postgresql/().md",
"postgresql/PostgreSQL Join.md",
"postgresql/Install PostgreSQL on WSL 2 (Ubuntu).md",
"index.md",
"postgresql",
Expand Down
11 changes: 8 additions & 3 deletions content/postgresql/PostgreSQL Conflict.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
draft: false
date: 2024-05-18 22:17
date: 2024-05-18 23:53
tags:
- postgres
---
Expand All @@ -25,9 +25,14 @@ ON CONFLICT (email) DO NOTHING;

### ON CONFLICT DO UPDATE

On the other hand, you can update specific column

On the other hand, you can update specific columns when the conflicts occur.

```sql
INSERT INTO example (email, name)
VALUES ('john@example.com', 'John Doe')
ON CONFLICT (email) DO UPDATE
SET name = EXCLUDED.name;
```


> [!info] References
Expand Down
4 changes: 2 additions & 2 deletions content/postgresql/PostgreSQL Join.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
draft: false
date: 2024-05-16 18:17
date: 2024-05-18 23:57
tags:
- postgres
---


### JOIN


```sql
JOIN car ON person.car_id = car.id;
Expand Down

0 comments on commit e312635

Please sign in to comment.