mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Escape columns names for time grains - postgres (#3736)
This commit is contained in:
parent
1e18bfdea4
commit
814b70ffd8
@ -214,14 +214,14 @@ class PostgresEngineSpec(BaseEngineSpec):
|
||||
|
||||
time_grains = (
|
||||
Grain("Time Column", _('Time Column'), "{col}"),
|
||||
Grain("second", _('second'), "DATE_TRUNC('second', {col})"),
|
||||
Grain("minute", _('minute'), "DATE_TRUNC('minute', {col})"),
|
||||
Grain("hour", _('hour'), "DATE_TRUNC('hour', {col})"),
|
||||
Grain("day", _('day'), "DATE_TRUNC('day', {col})"),
|
||||
Grain("week", _('week'), "DATE_TRUNC('week', {col})"),
|
||||
Grain("month", _('month'), "DATE_TRUNC('month', {col})"),
|
||||
Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', {col})"),
|
||||
Grain("year", _('year'), "DATE_TRUNC('year', {col})"),
|
||||
Grain("second", _('second'), "DATE_TRUNC('second', \"{col}\")"),
|
||||
Grain("minute", _('minute'), "DATE_TRUNC('minute', \"{col}\")"),
|
||||
Grain("hour", _('hour'), "DATE_TRUNC('hour', \"{col}\")"),
|
||||
Grain("day", _('day'), "DATE_TRUNC('day', \"{col}\")"),
|
||||
Grain("week", _('week'), "DATE_TRUNC('week', \"{col}\")"),
|
||||
Grain("month", _('month'), "DATE_TRUNC('month', \"{col}\")"),
|
||||
Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', \"{col}\")"),
|
||||
Grain("year", _('year'), "DATE_TRUNC('year', \"{col}\")"),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user