coc-sql icon indicating copy to clipboard operation
coc-sql copied to clipboard

UUID (default type for PostgreSQL) highlited as an error

Open 4nd3r5on opened this issue 2 years ago • 0 comments

I have no separate CoC-SQL configuration and default just copypasted from CoC's readme config to setup CoC intself. I just installed CoC-SQL with CocInstall coc-sql

My SQL migration with the name 0_initial.up.sql

CREATE TABLE IF NOT EXISTS users (
	id            UUID DEFAULT gen_random_uuid() NOT NULL UNIQUE,
	name          TEXT NOT NULL,
	public_key    BYTEA NOT NULL,
	password_hash BYTEA NOT NULL,
	password_salt BYTEA NOT NULL,
	created_at    TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);

The error I'm getting (highlighted near UUID)

Expected "#", "--", "->", "->>", ".", "/*", "BIGINT", "BIT", "CHAR", "DATE", "DATETIME", "DECIMAL", "DOUBLE", "ENUM", "FLOAT", "INT", "INTEGER", "JSON", "LONGTEXT", "MEDIUMTEXT", "NUMERIC", "SMALLINT", "TEXT", "TIME", "TIMESTAMP", "TINYINT", "TINYTEXT", "VARCHAR", "binary", "blob", "boolean", "longblob", "mediumblob", "tinyblob", "varbinary", or [ \t\n\r] but "U" found. (sql)

Similar thing happens with BYTEA type when I'm removing line with UUID or replacing UUID with TEXT.

4nd3r5on avatar Jan 03 '24 14:01 4nd3r5on