aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-04-04 11:52:36 -0700
committerchrislu <chris.lu@gmail.com>2023-04-04 11:52:36 -0700
commitefef6e94bff9b898748083fbe5d5b00fffc9f2fb (patch)
tree685568da8e199281c1dd0ddbe1c5df628a30b8d0
parentd4dec6c7302ad69fea81311b155d96063449f213 (diff)
downloadseaweedfs-efef6e94bff9b898748083fbe5d5b00fffc9f2fb.tar.xz
seaweedfs-efef6e94bff9b898748083fbe5d5b00fffc9f2fb.zip
use UPSERT for postgres style databases
-rw-r--r--weed/command/scaffold/filer.toml6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/scaffold/filer.toml b/weed/command/scaffold/filer.toml
index 88f9be2a6..85c11f783 100644
--- a/weed/command/scaffold/filer.toml
+++ b/weed/command/scaffold/filer.toml
@@ -108,7 +108,7 @@ connection_max_open = 100
connection_max_lifetime_seconds = 0
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
enableUpsert = true
-upsertQuery = """INSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4) ON CONFLICT (dirhash,name) DO UPDATE SET meta = EXCLUDED.meta WHERE "%[1]s".meta != EXCLUDED.meta"""
+upsertQuery = """UPSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4)"""
[postgres2]
enabled = false
@@ -133,7 +133,7 @@ connection_max_open = 100
connection_max_lifetime_seconds = 0
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
enableUpsert = true
-upsertQuery = """INSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4) ON CONFLICT (dirhash,name) DO UPDATE SET meta = EXCLUDED.meta WHERE "%[1]s".meta != EXCLUDED.meta"""
+upsertQuery = """UPSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4)"""
[cassandra]
# CREATE TABLE filemeta (
@@ -344,4 +344,4 @@ cert_path=""
# Set the private key path
key_path=""
# The name list used to verify the cn name
-verify_cn="" \ No newline at end of file
+verify_cn=""