Re: 9.5 Create Function Set From Current taken at creation time?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: 9.5 Create Function Set From Current taken at creation time?
Date: 2016-08-09 16:18:56
Message-ID: CAKFQuwYVPyk9BnhDgHi27kPWd4SJp0Ko3ihqDf5SQE-4-iN_Zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 9, 2016 at 9:43 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > Can we change the second sentence in the above quote to something like:​
>
> > SET FROM CURRENT is a convenience expression to capture the result of
> > current_setting('setting name') at the time of the function's creation.
> [if
> > more than just convenience an example of when this is useful would be
> nice].
>
> "Convenience" normally means that there's some other way to get the same
> result. I do not know of one, and I doubt we'd have introduced the
> feature if there was.
>

Fair enough...​so:

SET FROM CURRENT saves the
​[creating] ​
session's current value of the parameter as the value to be applied when
the function is entered.

​David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-08-09 17:22:19 Re: 9.5 Create Function Set From Current taken at creation time?
Previous Message Rader, David 2016-08-09 15:34:14 Re: [BUGS] BUG #14285: Chinese locale and windows