From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Kip Warner <kip(at)thevertigo(dot)com> |
Cc: | Sándor Daku <daku(dot)sandor(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Help with CREATE FUNCTION |
Date: | 2016-04-18 18:17:53 |
Message-ID: | CAKFQuwYW_jxGdsQzeiC2v6EX_776ducwkW-5U5Q_By9=gdewTw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Monday, April 18, 2016, Kip Warner <kip(at)thevertigo(dot)com> wrote:
> On Mon, 2016-04-18 at 10:57 -0700, David G. Johnston wrote:
> > Begin/end etc only work for pl/pgsql functions.
> >
> > What version of PostgreSQL?
>
> I'm using 9.4.
>
> > What are these supposed to represent?
>
> They are pre-calculated constants that are part of a more complex
> algorithm. I can't submit them when I install the database schema
> because they may change later
>
So?
> and they make more sense to be provided
>
as part of the client side application's query.
Then add three more arguments to the function and refer to those arguments
like you do the two ids.
There is no provision in PostgreSQL for constructing a global variable in
that fashion. You could maybe leverage GUCs to that effect, though.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-04-18 18:19:37 | Re: Help with CREATE FUNCTION |
Previous Message | Kip Warner | 2016-04-18 18:04:24 | Re: Help with CREATE FUNCTION |