Borvik / vscode-postgres

PostgreSQL extension for vscode providing explorer, highlighting, diagnostics, and intellisense
MIT License
228 stars 49 forks source link

[Bug] Syntax at or near "UUID" #250

Open cyraid opened 5 months ago

cyraid commented 5 months ago

Background

UUID is supported in my Postgres version, and when an .sql file created using the UUID it does exist and is successful.

Overview

In an SQL file, say test.sql, setting the language mode to Postgres, using the following:

CREATE TABLE IF NOT EXISTS "test" (
  "id" UUID
);

Gives:

syntax at or near "UUID"

Screenshot

image

Suggestions

Perhaps even when implementing the recognition of UUID, an 'ignore' type could be an option? Is the extension using EXPLAIN behind the scenes?

Environment

Name Version
Postgres Version 16.2 [64bit linux]
PostgreSQL Extension Version v1.4.3
Host Environment Windows 11
*VSCode 1.90.1
VSCode Environment WSL Ubuntu 22.04 [64bit]
WSL 2.1.5.0

vdeclerk commented 4 months ago

The same happens with SERIAL and BIGSERIAL.

vdeclerk commented 4 months ago

If fact it is happening with the type of the first attribute of a CREATE TABLE statement, no matter which type it is. I'm using version 1.4.3 of the extension too (with Postgres 15.6 on native Linux host).