Re: Help with CREATE FUNCTION - Mailing list pgsql-novice

From David G. Johnston
Subject Re: Help with CREATE FUNCTION
Date
Msg-id CAKFQuwYW_jxGdsQzeiC2v6EX_776ducwkW-5U5Q_By9=gdewTw@mail.gmail.com
Whole thread Raw
In response to Re: Help with CREATE FUNCTION  (Kip Warner <kip@thevertigo.com>)
Responses Re: Help with CREATE FUNCTION
Re: Help with CREATE FUNCTION
List pgsql-novice
On Monday, April 18, 2016, Kip Warner <kip@thevertigo.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.

pgsql-novice by date:

Previous
From: Kip Warner
Date:
Subject: Re: Help with CREATE FUNCTION
Next
From: Tom Lane
Date:
Subject: Re: Help with CREATE FUNCTION