RES: help with generation_series in pg10

2018-01-10 Thread Márcio A . Sepp
> >> > how can i have the same in pg10 as i have had in pg 9.x? > >> > >> Move the function call to the FROM clause: > >> > >> select g, (g - 1) % 5 + 1 from generate_series(1, 10) g; > > > > thank you. That is exact what i need. > > > > > >> > I need it to date type to... if possible. > >> > >> T

Re: RES: help with generation_series in pg10

2018-01-09 Thread Alvaro Herrera
Márcio A. Sepp wrote: > > There is a generate_series() variant that can return dates (more > > precisely, timestamp with time zone). But what exactly would you like > > returned? > > In the past i use querys like this to generate some timestamp field: > select generate_series (1, 10), generate_s

RES: help with generation_series in pg10

2018-01-09 Thread Márcio A . Sepp
> > how can i have the same in pg10 as i have had in pg 9.x? > > Move the function call to the FROM clause: > > select g, (g - 1) % 5 + 1 from generate_series(1, 10) g; thank you. That is exact what i need. > > I need it to date type to... if possible. > > There is a generate_series() vari