Re: Declare variable from other variable

From: Raul Kaubi <raulkaubi(at)gmail(dot)com>
To: depesz(at)depesz(dot)com
Cc: Yasin Sari <yasinsari81(at)googlemail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Declare variable from other variable
Date: 2020-02-05 14:02:04
Message-ID: CAO_+3-BB_gLFmxBm_HsQA18a-0F6ZB4wSwf9ZwML57Mqc26SZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Makes sense yeah.

Thanks for both of your help.

Raul

Kontakt hubert depesz lubaczewski (<depesz(at)depesz(dot)com>) kirjutas kuupäeval
K, 5. veebruar 2020 kell 14:50:

> 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
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raul Kaubi 2020-02-05 14:17:09 Error handling: Resume work after error
Previous Message hubert depesz lubaczewski 2020-02-05 12:50:43 Re: Declare variable from other variable