-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Describe the bug
Hello,
I've encountered an issue with a query that is valid in pglite (https://pglite.dev/docs/api#dev-blob)
The following query:
COPY some_table FROM '/dev/blob' WITH (FORMAT csv);...triggers a validation error: could not open file "/dev/blob" for reading: No such file or directory.
This syntax is correct within pglite, which treats /dev/blob as a special in-memory blob reference. It seems the language server is trying to validate the path against the local filesystem, which doesn't work for this special case.
It would be great if plpgsql-lsp could recognize /dev/blob as a special path and skip the filesystem check for it, or have a flag to ignore this specific check (queries on the frontend are not always used where they was defined)
I'm willing to help and contribute a pull request to fix this. Could you please provide some pointers on where this file path validation logic is located in the codebase? I want to make sure my changes align with the project's design.
Thank you for the great tool!
As a temporary workaround, I disable validation for this specific file by adding the following comment at the top of copyCsvBlob.sql:
/* plpgsql-language-server:disable validation */Expected Behavior
No error is given
Current Behavior
could not open file "/dev/blob" for reading: No such file or directory
Environment
- Mac