Re: Problems with using function input paramaters

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: stan <stanb(at)panix(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Problems with using function input paramaters
Date: 2019-08-31 14:45:25
Message-ID: CAKFQuwaEENXNMJy9fbxN8VjAkSrRqgMWMPFma1agLevm0bZ5_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Aug 31, 2019 at 7:05 AM stan <stanb(at)panix(dot)com> wrote:

>
> CURRENT_DATE) - interval ' $1
> month - 1
> ' day as date)
>

($1 || ' month')::interval -- should work

Content within a literal (i.e., between single quotes) is always treated as
literal content.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-08-31 15:13:30 Re: Problems with using function input paramaters
Previous Message Rich Shepard 2019-08-31 14:29:39 Re: Aggregate functions on groups