Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 167
    • Issues 167
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 11
    • Merge Requests 11
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #306

Closed
Open
Opened Feb 08, 2024 by Przemyslaw Kaminski@cgenie
  • Report abuse
  • New issue
Report abuse New issue

Use PostgreSQL 15 MERGE operator

PostgreSQL 15 introduced the MERGE operator: https://www.postgresql.org/docs/15/sql-merge.html

This allows to INSERT/UPDATE/DELETE in one single statement. Currently we have this code:

https://gitlab.iscpif.fr/gargantext/haskell-gargantext/blob/dev/src/Gargantext/Core/NodeStory.hs#L506-513

i.e. we insert/update/delete rows by hand in Haskell (node stories).

The task is to rewrite this into PostgreSQL 15 MERGE.

This might help in tricky issues such as #303 (closed) (it's better to do one PostgreSQL transaction than split things in the backend).

Edited Feb 08, 2024 by Przemyslaw Kaminski
Assignee
Assign to
Epic 0.0.7
Milestone
Epic 0.0.7
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#306