Greenplum Keyword Compatibility Reference¶
Generated for GSP Java version 4.1.0.8 on 2026-03-15
This page was generated using hybrid static extraction from parser source files combined with runtime validation against the actual GSP parser. Re-run the extraction script after parser updates to keep this page current.
Keyword-as-Column-Name Support¶
As of version 4.1.0.8, the GSP Greenplum parser includes a targeted lexer lookahead mechanism that disambiguates keywords based on their surrounding token context (e.g., function keywords are only converted when NOT followed by ().
Full Classification Overview¶
Out of 519 keywords recognized by the GSP Greenplum parser:
| Classification | Count | Description |
|---|---|---|
| Allowed | 466 | Can be used as an unquoted column name in both canonical contexts |
| Context-specific | 52 | Fails as SELECT keyword FROM t but works as SELECT t.keyword FROM t |
| Blocked | 1 | Cannot be used as an unquoted column name in either context |
Context-Specific Keywords (52)¶
These keywords fail when used as bare column names (SELECT keyword FROM t) but succeed when table-qualified (SELECT t.keyword FROM t).
| Keyword | Reason |
|---|---|
ALL |
SELECT qualifier |
ARRAY |
Type keyword |
AUTHORIZATION |
Grammar keyword |
BIT |
Grammar keyword |
BOOLEAN |
Type keyword |
CASE |
Expression keyword |
CAST |
Expression keyword |
CHAR |
Type keyword |
COALESCE |
Expression keyword |
CONCURRENTLY |
Grammar keyword |
CROSS |
JOIN keyword |
DEC |
Type keyword |
DECIMAL |
Type keyword |
DISTINCT |
SELECT qualifier |
FLOAT |
Type keyword |
FREEZE |
Grammar keyword |
FULL |
JOIN keyword |
GREATEST |
Expression keyword |
ILIKE |
Operator keyword |
INTEGER |
Type keyword |
INTERVAL |
Type keyword |
IS |
Operator keyword |
JOIN |
JOIN keyword |
LEAST |
Expression keyword |
LEFT |
JOIN keyword |
LIKE |
Operator keyword |
NATIONAL |
Type keyword |
NATURAL |
JOIN keyword |
NCHAR |
Type keyword |
NOT |
Operator keyword |
NULLIF |
Expression keyword |
NUMERIC |
Type keyword |
OUTER |
JOIN keyword |
OVERLAPS |
Operator keyword |
OVERLAY |
Expression keyword |
REAL |
Type keyword |
RIGHT |
JOIN keyword |
ROW |
Grammar keyword |
SIMILAR |
Operator keyword |
SMALLINT |
Type keyword |
SUBSTRING |
Expression keyword |
TREAT |
Expression keyword |
VARCHAR |
Type keyword |
VERBOSE |
Grammar keyword |
XMLCONCAT |
Grammar keyword |
XMLELEMENT |
Grammar keyword |
XMLEXISTS |
Grammar keyword |
XMLFOREST |
Grammar keyword |
XMLPARSE |
Grammar keyword |
XMLPI |
Grammar keyword |
XMLROOT |
Grammar keyword |
XMLSERIALIZE |
Grammar keyword |
Blocked Keywords (1)¶
These keywords cannot be used as unquoted column names in either context.
| Keyword | Workaround |
|---|---|
FROM |
SELECT "from" FROM t |
Workaround: Double-Quoted Identifiers¶
For any keyword that fails as an unquoted column name, you can use double-quoted identifiers:
1 2 3 4 5 | |
Scope and Limitations¶
- Tested contexts:
SELECT keyword FROM tandSELECT t.keyword FROM t. Other contexts (DDL column definitions, INSERT column lists, aliases) may behave differently. - Version-specific: This report reflects GSP Java version 4.1.0.8.
- Case sensitivity: Keywords are case-insensitive.
select,SELECT, andSelectare all treated the same.
How to Report Discrepancies¶
If you encounter a keyword that behaves differently from what this page describes, please report it through your support channel. Include:
- The exact SQL statement
- The GSP parser version
- Whether the same SQL works in Greenplum
Methodology¶
- Static extraction: A Python script parses the lexer (
.cod) and grammar (.y) source files to identify all 519 keywords and their grammar classifications. - Runtime validation: A Java test harness validates every classification against actual
TGSqlParserruntime behavior. - JSON dataset: The authoritative data is stored in
docs/generated/greenplum_keyword_compatibility.json.