Sublime Forum

Oracle PL/SQL file type

#1

How can I define a type for Oracle PL/SQL so I can get correct syntax highligting? The existing SQL types do not recognize a number of oracle datatypes, such as VARCHAR2.

0 Likes

#2

Probably you will want to add missing types here:

You can follow the instructions in the readme to make the changes locally and then submit a Pull Request :slightly_smiling_face:

0 Likes

#3

I’m not sure that is the best approach – I wouldn’t want to pollute the PostgreSQL syntax with oracle specific types which would make the syntax invalid for both PostgreSQL and Oracle. I’ll probably have to define a separate syntax for Oracle just to keep things organized. Seems like a large undertaking, though.

0 Likes

#4

You can extend the PostgreSQL syntax and just override the types if that is the main difference

0 Likes

#5

Well, if I wanted it solely for my personal use, I guess that would work – but your initial suggestion was to submit a pull request, which would end up invalidating the syntax for everyone else.

0 Likes

#6

I might be wrong, but I think @kingkeith meant to extend from the PG Syntax (so inherit, not overwrite).

0 Likes

#7

I think that would be rather confusing on Oracle, since PostgreSQL has a lot of types Oracle doesn’t. I think I’ll need to extend the generic SQL syntax and work up from there.

0 Likes

#8

oh sorry, I somehow misread PL/SQL as PG/SQL and thought it was some proprietary extension of Postgres. Yeah, I guess work from the generic one. Can still submit a PR with a new sublime-syntax for Oracle :slight_smile:

0 Likes