use the actual column name
This commit is contained in:
parent
c97e92f3bc
commit
66813bb156
@ -39,7 +39,7 @@ SELECT
|
|||||||
string_agg(
|
string_agg(
|
||||||
'LEFT OUTER JOIN fc.perd '||func||' ON'||
|
'LEFT OUTER JOIN fc.perd '||func||' ON'||
|
||||||
$$
|
$$
|
||||||
$$||'(o.'||fkey||' + interval '||format('%L',_interval) ||' )::date <@ '||func||'.drange'
|
$$||'(o.'||format('%I',cname)||' + interval '||format('%L',_interval) ||' )::date <@ '||func||'.drange'
|
||||||
,E'\n')
|
,E'\n')
|
||||||
INTO
|
INTO
|
||||||
_perd_joins
|
_perd_joins
|
||||||
@ -75,7 +75,7 @@ SELECT
|
|||||||
ELSE
|
ELSE
|
||||||
--use the date key but increment by the target interval
|
--use the date key but increment by the target interval
|
||||||
--this assumes that the primary key for the func is a date, but it has to be or it wont join anyways
|
--this assumes that the primary key for the func is a date, but it has to be or it wont join anyways
|
||||||
'o.'||fkey||' + interval '||format('%L',_interval) ||' AS '||fkey
|
'o.'||format('%I',cname)||' + interval '||format('%L',_interval) ||' AS '||format('%I',cname)
|
||||||
END
|
END
|
||||||
ELSE
|
ELSE
|
||||||
'o.'||format('%I',cname)
|
'o.'||format('%I',cname)
|
||||||
|
Loading…
Reference in New Issue
Block a user