Re: Declare variable from other variable

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Declare variable from other variable
Дата
Msg-id 20200205125043.GA32676@depesz.com
обсуждение исходный текст
Ответ на Re: Declare variable from other variable  (Raul Kaubi <raulkaubi@gmail.com>)
Ответы Re: Declare variable from other variable  (Raul Kaubi <raulkaubi@gmail.com>)
Список pgsql-general
On Wed, Feb 05, 2020 at 02:42:42PM +0200, Raul Kaubi wrote:
> Thanks, it worked!
> 
> By the way, what does this "**j"* mean there..? (this does not mean
> multiply there?)

it's normal multiplication.

Your "j" variable is integer.

So, '1 month'::interval * j is some number of months.
> And what if, I would like to declare v_to_date also, so that v_to_date is
> always + 1 month compared to v_date_from..?

v_to_date := v_from_date + '1 month'::interval; ?

Best regards,

depesz




В списке pgsql-general по дате отправления:

Предыдущее
От: Raul Kaubi
Дата:
Сообщение: Re: Declare variable from other variable
Следующее
От: Raul Kaubi
Дата:
Сообщение: Re: Declare variable from other variable