Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ON CONFLICT DO UPDATE is broken #434

Closed
Assignees
juleswritescode
Labels
bugSomething isn't working
@dkrieger

Description

@dkrieger

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched theDocs, GitHubDiscussions, andDiscord.

Describe the bug

ON CONFLICT .. DO UPDATE queries are improperly flagged as invalid syntax, and the LSP Is interpreting it as 2 separate statements (2nd starting with "UPDATE"). Putting the same syntax inside a CTE is considered valid by the LSP.

To Reproduce

write this query and observe the squiggles; it's interpreting it as two separate statements, first one ending onDO (inclusive)

INSERT INTOfoo.bar (    pk)VALUES (    $1)ON CONFLICT (pk) DOUPDATESET    date_deleted= DEFAULT,    date_created= DEFAULT;

Now put this same thing inside a CTE and observe that the LSP does not complain

WITH asdfAS (INSERT INTOfoo.bar (        pk    )VALUES (        $1    )ON CONFLICT (pk) DOUPDATESET        date_deleted= DEFAULT,        date_created= DEFAULT)SELECT1;

Expected behavior

Recognize valid syntax when usingON CONFLICT .. DO UPDATE in any context

System information

  • OS: macos

Additional context

  • IDE: vscode w/ postgrestools extension
  • used default/suggested configwith the db section removed so that it's all LSP / not using db connection

Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp