Skip to content
Advertisement

Data type “smallserial” in Postgres not highlighted in Visual Studio Code

I am new to postgres, and I am using Visual Studio Code IDE (version 1.62) to write my scripts.

While doing so, I am observing this strange behaviour where VS Code doesn’t highlight the data type smallserial (2 bytes).

Here is what I see:

enter image description here

But I know that the script is correct because this query runs successfully. How can I get the proper highlighting here?

Advertisement

Answer

That’s probably because smallserial (like serial or bigserial) are not actual data types. See:

In Postgres 10 or later, consider an IDENTITY column instead. See:

If serial and bigserial are highlighted, but smallserial is not, then that’s inconsistent and should be fixed.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement