postgres-language-server icon indicating copy to clipboard operation
postgres-language-server copied to clipboard

DDL drop table: Switch error message to warning type

Open Donnerstagnacht opened this issue 8 months ago • 0 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

As discussed in https://github.com/supabase-community/postgres-language-server/discussions/365

If I write a drop table statement, it is technically correct code:

But it creates the following error:

Dropping a table may break existing clients.
image

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a table and drop it
DROP TABLE IF EXISTS public.groups;
DROP TABLE IF EXISTS groups;

Expected behavior

Error should be a hint or a warning instead of an error since this statement may be intended and therefore correct.

System information

  • OS: windows 11
  • editor: vs-code
  • pls: 0.5.0

Additional context

Another option could the intended and planned pls annotation: // @pg-ignore

Donnerstagnacht avatar Apr 22 '25 08:04 Donnerstagnacht